|
PostgreSQL Source Code git master
|
#include "postgres.h"#include "access/genam.h"#include "access/htup_details.h"#include "access/nbtree.h"#include "access/table.h"#include "access/xact.h"#include "catalog/catalog.h"#include "catalog/indexing.h"#include "catalog/namespace.h"#include "catalog/pg_class.h"#include "catalog/pg_collation_d.h"#include "catalog/pg_operator_d.h"#include "catalog/pg_propgraph_element.h"#include "catalog/pg_propgraph_element_label.h"#include "catalog/pg_propgraph_label.h"#include "catalog/pg_propgraph_label_property.h"#include "catalog/pg_propgraph_property.h"#include "commands/defrem.h"#include "commands/propgraphcmds.h"#include "commands/tablecmds.h"#include "nodes/nodeFuncs.h"#include "parser/parse_coerce.h"#include "parser/parse_collate.h"#include "parser/parse_oper.h"#include "parser/parse_relation.h"#include "parser/parse_target.h"#include "utils/array.h"#include "utils/builtins.h"#include "utils/fmgroids.h"#include "utils/inval.h"#include "utils/lsyscache.h"#include "utils/rel.h"#include "utils/ruleutils.h"#include "utils/syscache.h"
Go to the source code of this file.
Data Structures | |
| struct | element_info |
| ObjectAddress AlterPropGraph | ( | ParseState * | pstate, |
| const AlterPropGraphStmt * | stmt | ||
| ) |
Definition at line 1291 of file propgraphcmds.c.
References AccessShareLock, Assert, BTEqualStrategyNumber, CacheInvalidateRelcacheByRelid(), check_all_labels_properties(), check_element_label_properties(), check_element_properties(), CommandCounterIncrement(), CStringGetDatum(), ereport, errcode(), errdetail(), errmsg, ERROR, fb(), foreach_oid, get_edge_oid(), get_element_relid(), get_graph_label_ids(), get_graph_property_ids(), get_label_element_label_ids(), get_rel_name(), get_rel_persistence(), get_vertex_oid(), GetSysCacheOid2, insert_element_record(), insert_label_record(), insert_property_records(), InvalidObjectAddress, InvalidOid, element_info::key, lfirst, lfirst_node, NoLock, NOTICE, ObjectAddressSet, ObjectIdGetDatum(), palloc0_object, parser_errposition(), performDeletion(), propgraph_edge_get_ref_keys(), propgraph_element_get_key(), PROPGRAPH_ELEMENT_KIND_VERTEX, RangeVarCallbackOwnsRelation(), RangeVarGetRelidExtended(), RelationData::rd_rel, RowShareLock, RVR_MISSING_OK, ScanKeyInit(), SearchSysCacheExists2, ShareRowExclusiveLock, stmt, strVal, systable_beginscan(), systable_endscan(), systable_getnext(), table_close(), and table_open().
Referenced by ProcessUtilitySlow().
|
static |
Definition at line 561 of file propgraphcmds.c.
References construct_array_builtin(), fb(), i, Int16GetDatum(), and palloc_array.
Referenced by propgraph_edge_get_ref_keys(), and propgraph_element_get_key().
|
static |
Definition at line 518 of file propgraphcmds.c.
References attnum, ereport, errcode(), errmsg, ERROR, fb(), get_attnum(), get_rel_name(), i, j, lfirst, list_length(), palloc_array, parser_errposition(), RelationGetRelid, element_info::relid, and strVal.
Referenced by propgraph_edge_get_ref_keys(), and propgraph_element_get_key().
|
static |
Definition at line 574 of file propgraphcmds.c.
References add_exact_object_address(), DatumGetInt16(), deconstruct_array_builtin(), fb(), i, ObjectAddressSubSet, and element_info::relid.
Referenced by insert_element_record().
|
static |
Definition at line 591 of file propgraphcmds.c.
References add_exact_object_address(), DatumGetObjectId(), deconstruct_array_builtin(), fb(), i, and ObjectAddressSet.
Referenced by insert_element_record().
Definition at line 1276 of file propgraphcmds.c.
References check_element_label_properties(), fb(), foreach_oid, get_graph_label_ids(), and get_label_element_label_ids().
Referenced by AlterPropGraph(), and CreatePropGraph().
Definition at line 1182 of file propgraphcmds.c.
References AccessShareLock, BTEqualStrategyNumber, elog, ereport, errcode(), errmsg, ERROR, fb(), Form_pg_propgraph_element_label, get_element_label_property_names(), get_propgraph_label_name(), GETSTRUCT(), HeapTupleIsValid, InvalidOid, element_info::key, list_difference(), list_length(), ObjectIdGetDatum(), ScanKeyInit(), systable_beginscan(), systable_endscan(), systable_getnext(), table_close(), and table_open().
Referenced by AlterPropGraph(), and check_all_labels_properties().
Definition at line 1051 of file propgraphcmds.c.
References AccessShareLock, Assert, BTEqualStrategyNumber, deparse_context_for(), deparse_expression(), elog, equal(), ereport, errcode(), errdetail(), errmsg, ERROR, fb(), forboth, Form_pg_propgraph_element, Form_pg_propgraph_element_label, Form_pg_propgraph_label_property, get_propgraph_property_name(), get_rel_name(), GETSTRUCT(), heap_getattr(), HeapTupleIsValid, lappend(), lappend_oid(), lfirst, lfirst_oid, NameStr, NIL, ObjectIdGetDatum(), RelationGetDescr, ReleaseSysCache(), ScanKeyInit(), SearchSysCache1(), stringToNode(), systable_beginscan(), systable_endscan(), systable_getnext(), table_close(), table_open(), and TextDatumGetCString.
Referenced by AlterPropGraph(), and CreatePropGraph().
| ObjectAddress CreatePropGraph | ( | ParseState * | pstate, |
| const CreatePropGraphStmt * | stmt | ||
| ) |
Definition at line 104 of file propgraphcmds.c.
References AccessShareLock, Assert, check_all_labels_properties(), check_element_properties(), CommandCounterIncrement(), copyObject, DefineRelation(), element_info::destrelid, ereport, errcode(), errmsg, ERROR, fb(), foreach_oid, insert_element_record(), InvalidOid, lappend(), lappend_oid(), lfirst, lfirst_node, list_member(), makeNode, makeString(), NIL, NoLock, NOTICE, ONCOMMIT_NOOP, palloc0_object, parser_errposition(), propgraph_edge_get_ref_keys(), propgraph_element_get_key(), RangeVarCallbackOwnsRelation(), RangeVarGetRelidExtended(), RelationData::rd_rel, element_info::srcrelid, stmt, table_close(), and table_open().
Referenced by ProcessUtilitySlow().
|
static |
Definition at line 1716 of file propgraphcmds.c.
References CStringGetDatum(), ereport, errcode(), errmsg, ERROR, fb(), Form_pg_propgraph_element, get_rel_name(), GETSTRUCT(), ObjectIdGetDatum(), parser_errposition(), ReleaseSysCache(), and SearchSysCache2().
Referenced by AlterPropGraph().
Definition at line 1826 of file propgraphcmds.c.
References AccessShareLock, BTEqualStrategyNumber, fb(), Form_pg_propgraph_label_property, get_propgraph_property_name(), GETSTRUCT(), element_info::key, lappend(), makeString(), NIL, ObjectIdGetDatum(), ScanKeyInit(), systable_beginscan(), systable_endscan(), systable_getnext(), table_close(), and table_open().
Referenced by check_element_label_properties().
Definition at line 1747 of file propgraphcmds.c.
References elog, ERROR, fb(), Form_pg_propgraph_element, GETSTRUCT(), ObjectIdGetDatum(), ReleaseSysCache(), and SearchSysCache1().
Referenced by AlterPropGraph().
Definition at line 1767 of file propgraphcmds.c.
References AccessShareLock, BTEqualStrategyNumber, fb(), Form_pg_propgraph_label, GETSTRUCT(), HeapTupleIsValid, element_info::key, lappend_oid(), NIL, ObjectIdGetDatum(), ScanKeyInit(), systable_beginscan(), systable_endscan(), systable_getnext(), table_close(), and table_open().
Referenced by AlterPropGraph(), and check_all_labels_properties().
Definition at line 1860 of file propgraphcmds.c.
References AccessShareLock, BTEqualStrategyNumber, fb(), Form_pg_propgraph_property, GETSTRUCT(), HeapTupleIsValid, element_info::key, lappend_oid(), NIL, ObjectIdGetDatum(), ScanKeyInit(), systable_beginscan(), systable_endscan(), systable_getnext(), table_close(), and table_open().
Referenced by AlterPropGraph().
Definition at line 1795 of file propgraphcmds.c.
References AccessShareLock, BTEqualStrategyNumber, fb(), Form_pg_propgraph_element_label, GETSTRUCT(), HeapTupleIsValid, element_info::key, lappend_oid(), NIL, ObjectIdGetDatum(), ScanKeyInit(), systable_beginscan(), systable_endscan(), systable_getnext(), table_close(), and table_open().
Referenced by AlterPropGraph(), and check_all_labels_properties().
|
static |
Definition at line 1684 of file propgraphcmds.c.
References CStringGetDatum(), ereport, errcode(), errmsg, ERROR, fb(), Form_pg_propgraph_element, get_rel_name(), GETSTRUCT(), ObjectIdGetDatum(), parser_errposition(), ReleaseSysCache(), and SearchSysCache2().
Referenced by AlterPropGraph().
|
static |
Definition at line 612 of file propgraphcmds.c.
References add_exact_object_address(), element_info::aliasname, array_of_attnums_to_objectaddrs(), array_of_opers_to_objectaddrs(), CatalogTupleInsert(), CharGetDatum(), CommandCounterIncrement(), DEPENDENCY_AUTO, DEPENDENCY_NORMAL, fb(), GetNewOidWithIndex(), heap_form_tuple(), heap_freetuple(), insert_label_record(), insert_property_records(), lfirst_node, makeNode, NameGetDatum(), namestrcpy(), new_object_addresses(), NoLock, ObjectAddressSet, ObjectIdGetDatum(), PointerGetDatum(), record_object_address_dependencies(), recordDependencyOn(), RelationGetDescr, RowExclusiveLock, table_close(), table_open(), and values.
Referenced by AlterPropGraph(), and CreatePropGraph().
Definition at line 745 of file propgraphcmds.c.
References CatalogTupleInsert(), CStringGetDatum(), DEPENDENCY_AUTO, fb(), GetNewOidWithIndex(), GetSysCacheOid2, heap_form_tuple(), heap_freetuple(), label, NameGetDatum(), namestrcpy(), NoLock, ObjectAddressSet, ObjectIdGetDatum(), recordDependencyOn(), RelationGetDescr, RowExclusiveLock, table_close(), table_open(), and values.
Referenced by AlterPropGraph(), and insert_element_record().
|
static |
Definition at line 915 of file propgraphcmds.c.
References CatalogTupleInsert(), copyObject, CStringGetDatum(), CStringGetTextDatum, DEPENDENCY_AUTO, DEPENDENCY_NORMAL, ereport, errcode(), errdetail(), errmsg, ERROR, exprCollation(), exprType(), exprTypmod(), fb(), Form_pg_propgraph_property, format_type_with_typemod(), get_collation_name(), GetNewOidWithIndex(), GETSTRUCT(), GetSysCacheOid2, heap_form_tuple(), heap_freetuple(), Int32GetDatum(), NameGetDatum(), namestrcpy(), nodeToString(), NoLock, ObjectAddressSet, ObjectIdGetDatum(), OidIsValid, recordDependencyOn(), recordDependencyOnSingleRelExpr(), RelationGetDescr, ReleaseSysCache(), RowExclusiveLock, SearchSysCache1(), table_close(), table_open(), and values.
Referenced by insert_property_records().
|
static |
Definition at line 823 of file propgraphcmds.c.
References AccessShareLock, addNSItemToQuery(), addRangeTableEntryForRelation(), PropGraphProperties::all, assign_expr_collations(), BTEqualStrategyNumber, ereport, errcode(), errmsg, ERROR, TargetEntry::expr, EXPR_KIND_PROPGRAPH_PROPERTY, fb(), GETSTRUCT(), HeapTupleIsValid, insert_property_record(), IsA, element_info::key, lappend(), lfirst_node, list_make1, make_parsestate(), makeNode, makeString(), NameStr, NIL, NoLock, ObjectIdGetDatum(), parser_errposition(), PropGraphProperties::properties, pstrdup(), RowShareLock, ScanKeyInit(), systable_beginscan(), systable_endscan(), systable_getnext(), table_close(), table_open(), and transformTargetList().
Referenced by AlterPropGraph(), and insert_element_record().
|
static |
Definition at line 371 of file propgraphcmds.c.
References element_info::aliasname, array_from_attnums(), array_from_column_list(), Assert, BTEqualStrategyNumber, can_coerce_type(), COERCION_IMPLICIT, construct_array_builtin(), ereport, errcode(), errmsg, ERROR, fb(), foreach_node, get_atttypetypmodcoll(), get_collation_name(), get_opclass_family(), get_opfamily_member(), GetDefaultOpClass(), HTEqualStrategyNumber, i, InvalidOid, list_length(), ObjectIdGetDatum(), OidIsValid, palloc_array, parser_errposition(), RelationGetFKeyList(), RelationGetRelid, and type.
Referenced by AlterPropGraph(), and CreatePropGraph().
|
static |
Definition at line 325 of file propgraphcmds.c.
References a, AccessShareLock, element_info::aliasname, array_from_attnums(), array_from_column_list(), ereport, errcode(), errmsg, ERROR, fb(), index_close(), index_open(), list_length(), NIL, NoLock, parser_errposition(), and RelationGetPrimaryKeyIndex().
Referenced by AlterPropGraph(), and CreatePropGraph().