hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject [34/35] incubator-hawq git commit: SGA import. Now with files previously missing because of the .gitignore issue
Date Tue, 22 Sep 2015 19:14:37 GMT
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/a485be47/src/backend/access/index/basedef.json
----------------------------------------------------------------------
diff --git a/src/backend/access/index/basedef.json b/src/backend/access/index/basedef.json
new file mode 100644
index 0000000..a67bb33
--- /dev/null
+++ b/src/backend/access/index/basedef.json
@@ -0,0 +1,5492 @@
+{
+   "insert into gp_distribution_policy" : {
+      "cql" : "cql",
+      "files" : {
+         "../../../..//src/backend/cdb/cdbcat.c" : 1
+      },
+      "foreign_key_tables" : {
+         "pg_class" : {
+            "(oid) <- (localoid)" : 1
+         }
+      },
+      "func" : "static\nSysScanDesc\ncaql_basic_fn_1(cqContext *pCtx, cq_list *pcql, bool bLockEntireTable)\n{\n\tRelation\trel;\n\n\tpCtx->cq_relationId = GpPolicyRelationId;\n\n\tif (!pCtx->cq_externrel)\n\t{\n\t\t\n\t\t{\n\t\t\tpCtx->cq_heap_rel = heap_open(pCtx->cq_relationId, \n\t\t\t\t\t\t\t\t\t\t  pCtx->cq_lockmode);\n\t\t\tpCtx->cq_tupdesc  = RelationGetDescr(pCtx->cq_heap_rel);\n\t\t}\n\t}\n\telse\n\t{\n\t\t/* make sure the supplied relation matches the caql */\n\t\tif (RelationIsValid(pCtx->cq_heap_rel))\n\t\t{\n\t\t\tAssert(GpPolicyRelationId == \n\t\t\t\t   RelationGetRelid(pCtx->cq_heap_rel));\n\t\t\tpCtx->cq_tupdesc  = RelationGetDescr(pCtx->cq_heap_rel);\n\t\t}\n\n\t}\t\t\n\n\trel = pCtx->cq_heap_rel;\n\n\treturn NULL; /* XXX XXX: don't init scan */\n}\n",
+      "func_name" : "caql_basic_fn_1",
+      "func_note" : "",
+      "func_number" : "1",
+      "indexes" : {},
+      "iud_func" : "\nstatic\nvoid caql_iud_fn_1(cqContext *pCtx, int is_iud, \n\t\t\t\t\t HeapTuple oldtup, HeapTuple newtup, bool dontWait,\n\t\t\t\t\t LOCKMODE pklockmode)\n{\n\tOid oldhash = 0;\n\tOid newhash = 0;\n\n\tif (HeapTupleIsValid(oldtup))\n\t{\n\t\tif (!pCtx->cq_setpklock)\n\t\t\tAssert(RelationIsValid(pCtx->cq_heap_rel));\n\t\n\t\toldhash = 0;\n\t}\n\tif (HeapTupleIsValid(newtup))\n\t{\n\t\tif (!pCtx->cq_setpklock)\n\t\t\tAssert(RelationIsValid(pCtx->cq_heap_rel));\n\t\n\t\tnewhash = 0;\n\t}\n\n\t/*\n\t1 unique index:\n\tGpPolicyLocalOidIndexId: localoid\n\t*/\n\t/* gp_distribution_policy: do not get exclusive lock */\n\n\t/* NOTE: don't get fk locks if only needed share locks on pk */\n\tif (pklockmode != AccessExclusiveLock)\n\t\treturn;\n\n\tif (!is_iud)\n\t{\n\t\t\n\t}\n\telse\n\t{\n\t\tdontWait = true; /* never wait for share locks on foreign keys */\n\t\t/* \n\t\t  if insert/update, check foreign keys against:\t\n\t\t  pg_class (oid) <- (localoid) \n\t\t*/\n\n\t
 \t/* No Share Locks Acquired */\n\t}\n} /* end caql_iud_fn_1 */\n",
+      "iud_func_name" : "caql_iud_fn_1",
+      "num_del_ops" : 0,
+      "num_ins_ops" : 1,
+      "num_upd_ops" : 0,
+      "tablename" : "gp_distribution_policy"
+   },
+   "insert into gp_segment_configuration" : {
+      "cql" : "cql",
+      "files" : {
+         "../../../..//src/backend/utils/gp/segadmin.c" : 1
+      },
+      "func" : "static\nSysScanDesc\ncaql_basic_fn_2(cqContext *pCtx, cq_list *pcql, bool bLockEntireTable)\n{\n\tRelation\trel;\n\n\tpCtx->cq_relationId = GpSegmentConfigRelationId;\n\n\tif (!pCtx->cq_externrel)\n\t{\n\t\t\n\t\t{\n\t\t\tpCtx->cq_heap_rel = heap_open(pCtx->cq_relationId, \n\t\t\t\t\t\t\t\t\t\t  pCtx->cq_lockmode);\n\t\t\tpCtx->cq_tupdesc  = RelationGetDescr(pCtx->cq_heap_rel);\n\t\t}\n\t}\n\telse\n\t{\n\t\t/* make sure the supplied relation matches the caql */\n\t\tif (RelationIsValid(pCtx->cq_heap_rel))\n\t\t{\n\t\t\tAssert(GpSegmentConfigRelationId == \n\t\t\t\t   RelationGetRelid(pCtx->cq_heap_rel));\n\t\t\tpCtx->cq_tupdesc  = RelationGetDescr(pCtx->cq_heap_rel);\n\t\t}\n\n\t}\t\t\n\n\trel = pCtx->cq_heap_rel;\n\n\treturn NULL; /* XXX XXX: don't init scan */\n}\n",
+      "func_name" : "caql_basic_fn_2",
+      "func_note" : "",
+      "func_number" : "2",
+      "indexes" : {},
+      "iud_func" : "\nstatic\nvoid caql_iud_fn_2(cqContext *pCtx, int is_iud, \n\t\t\t\t\t HeapTuple oldtup, HeapTuple newtup, bool dontWait,\n\t\t\t\t\t LOCKMODE pklockmode)\n{\n\tOid oldhash = 0;\n\tOid newhash = 0;\n\n\tif (HeapTupleIsValid(oldtup))\n\t{\n\t\tif (!pCtx->cq_setpklock)\n\t\t\tAssert(RelationIsValid(pCtx->cq_heap_rel));\n\t\n\t\toldhash = 0;\n\t}\n\tif (HeapTupleIsValid(newtup))\n\t{\n\t\tif (!pCtx->cq_setpklock)\n\t\t\tAssert(RelationIsValid(pCtx->cq_heap_rel));\n\t\n\t\tnewhash = 0;\n\t}\n\n\t/*\n\t1 unique index:\n\tGpSegmentConfigRegistration_orderIndexId: registration_order\n\t*/\n\tif (HeapTupleIsValid(newtup))\n\t{\n\t\tDatum\t\td;\n\t\tbool\t\tisnull;\n\t\n\t\tnewhash = 0;\n\t\n\t\td = caql_getattr_internal(pCtx, newtup, Anum_gp_segment_configuration_registration_order,  &isnull);\n\t\tnewhash = caql_pkhash(pCtx, newhash, d, isnull, INT4OID);\n\t\n\t\tcaql_lockwell(pCtx, GpSegmentConfigRelationId, \n\t\t\t\t\t  pklockmode, newtup,\n\t\t\t\t\t  \"gp_segment_c
 onfiguration\",\n\t\t\t\t\t  \"registration_order\",\n\t\t\t\t\t  GpSegmentConfigRegistration_orderIndexId,\n\t\t\t\t\t  newhash,\n\t\t\t\t\t  dontWait,\n\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t);\n\t}\n\tif (HeapTupleIsValid(oldtup))\n\t{\n\t\tDatum\t\td;\n\t\tbool\t\tisnull;\n\t\n\t\toldhash = 0;\n\t\n\t\td = caql_getattr_internal(pCtx, oldtup, Anum_gp_segment_configuration_registration_order,  &isnull);\n\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, INT4OID);\n\t\n\t\tcaql_lockwell(pCtx, GpSegmentConfigRelationId, \n\t\t\t\t\t  pklockmode, oldtup,\n\t\t\t\t\t  \"gp_segment_configuration\",\n\t\t\t\t\t  \"registration_order\",\n\t\t\t\t\t  GpSegmentConfigRegistration_orderIndexId,\n\t\t\t\t\t  oldhash,\n\t\t\t\t\t  dontWait,\n\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t);\n\t}\n\n\n\t/* NOTE: don't get fk locks if only needed share locks on pk */\n\tif (pklockmode != AccessExclusiveLock)\n\t\treturn;\n\n\tif (!is_iud)\n\t{\n\t\t\n\t}\n\telse\n
 \t{\n\t\tdontWait = true; /* never wait for share locks on foreign keys */\n\t\t/* INSERT/UPDATE/DELETE: no references\n\t\t   gp_segment_configuration is unrelated to any other table */\n\t\t/* No Share Locks Acquired */\n\t}\n} /* end caql_iud_fn_2 */\n",
+      "iud_func_name" : "caql_iud_fn_2",
+      "num_del_ops" : 0,
+      "num_ins_ops" : 1,
+      "num_upd_ops" : 0,
+      "tablename" : "gp_segment_configuration"
+   },
+   "insert into pg_aggregate" : {
+      "cql" : "cql",
+      "files" : {
+         "../../../..//src/backend/catalog/pg_aggregate.c" : 1
+      },
+      "foreign_key_tables" : {
+         "pg_operator" : {
+            "(oid) <- (aggsortop)" : 1
+         },
+         "pg_proc" : {
+            "(oid) <- (aggfinalfn)" : 1,
+            "(oid) <- (aggfnoid)" : 1,
+            "(oid) <- (agginvprelimfn)" : 1,
+            "(oid) <- (agginvtransfn)" : 1,
+            "(oid) <- (aggprelimfn)" : 1,
+            "(oid) <- (aggtransfn)" : 1
+         },
+         "pg_type" : {
+            "(oid) <- (aggtranstype)" : 1
+         }
+      },
+      "func" : "static\nSysScanDesc\ncaql_basic_fn_3(cqContext *pCtx, cq_list *pcql, bool bLockEntireTable)\n{\n\tRelation\trel;\n\n\tpCtx->cq_relationId = AggregateRelationId;\n\n\tif (!pCtx->cq_externrel)\n\t{\n\t\t\n\t\t{\n\t\t\tpCtx->cq_heap_rel = heap_open(pCtx->cq_relationId, \n\t\t\t\t\t\t\t\t\t\t  pCtx->cq_lockmode);\n\t\t\tpCtx->cq_tupdesc  = RelationGetDescr(pCtx->cq_heap_rel);\n\t\t}\n\t}\n\telse\n\t{\n\t\t/* make sure the supplied relation matches the caql */\n\t\tif (RelationIsValid(pCtx->cq_heap_rel))\n\t\t{\n\t\t\tAssert(AggregateRelationId == \n\t\t\t\t   RelationGetRelid(pCtx->cq_heap_rel));\n\t\t\tpCtx->cq_tupdesc  = RelationGetDescr(pCtx->cq_heap_rel);\n\t\t}\n\n\t}\t\t\n\n\trel = pCtx->cq_heap_rel;\n\n\treturn NULL; /* XXX XXX: don't init scan */\n}\n",
+      "func_name" : "caql_basic_fn_3",
+      "func_note" : "",
+      "func_number" : "3",
+      "indexes" : {},
+      "iud_func" : "\nstatic\nvoid caql_iud_fn_3(cqContext *pCtx, int is_iud, \n\t\t\t\t\t HeapTuple oldtup, HeapTuple newtup, bool dontWait,\n\t\t\t\t\t LOCKMODE pklockmode)\n{\n\tOid oldhash = 0;\n\tOid newhash = 0;\n\n\tif (HeapTupleIsValid(oldtup))\n\t{\n\t\tif (!pCtx->cq_setpklock)\n\t\t\tAssert(RelationIsValid(pCtx->cq_heap_rel));\n\t\n\t\toldhash = 0;\n\t}\n\tif (HeapTupleIsValid(newtup))\n\t{\n\t\tif (!pCtx->cq_setpklock)\n\t\t\tAssert(RelationIsValid(pCtx->cq_heap_rel));\n\t\n\t\tnewhash = 0;\n\t}\n\n\t/*\n\t1 unique index:\n\tAggregateAggfnoidIndexId: aggfnoid\n\t*/\n\tif (HeapTupleIsValid(newtup))\n\t{\n\t\tDatum\t\td;\n\t\tbool\t\tisnull;\n\t\n\t\tnewhash = 0;\n\t\n\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_aggregate_aggfnoid,  &isnull);\n\t\tnewhash = caql_pkhash(pCtx, newhash, d, isnull, OIDOID);\n\t\n\t\tcaql_lockwell(pCtx, AggregateRelationId, \n\t\t\t\t\t  pklockmode, newtup,\n\t\t\t\t\t  \"pg_aggregate\",\n\t\t\t\t\t  \"aggfnoid\",\n\t\t\t\t\t  AggregateAg
 gfnoidIndexId,\n\t\t\t\t\t  newhash,\n\t\t\t\t\t  dontWait,\n\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t);\n\t}\n\tif (HeapTupleIsValid(oldtup))\n\t{\n\t\tDatum\t\td;\n\t\tbool\t\tisnull;\n\t\n\t\toldhash = 0;\n\t\n\t\td = caql_getattr_internal(pCtx, oldtup, Anum_pg_aggregate_aggfnoid,  &isnull);\n\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, OIDOID);\n\t\n\t\tcaql_lockwell(pCtx, AggregateRelationId, \n\t\t\t\t\t  pklockmode, oldtup,\n\t\t\t\t\t  \"pg_aggregate\",\n\t\t\t\t\t  \"aggfnoid\",\n\t\t\t\t\t  AggregateAggfnoidIndexId,\n\t\t\t\t\t  oldhash,\n\t\t\t\t\t  dontWait,\n\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t);\n\t}\n\n\n\t/* NOTE: don't get fk locks if only needed share locks on pk */\n\tif (pklockmode != AccessExclusiveLock)\n\t\treturn;\n\n\tif (!is_iud)\n\t{\n\t\t\n\t}\n\telse\n\t{\n\t\tdontWait = true; /* never wait for share locks on foreign keys */\n\t\t/* \n\t\t  if insert/update, check foreign keys against:\t\n\t\t  pg_operator (o
 id) <- (aggsortop)\n\t\t  pg_proc (oid) <- (aggfinalfn)\n\t\t  pg_proc (oid) <- (aggfnoid)\n\t\t  pg_proc (oid) <- (agginvprelimfn)\n\t\t  pg_proc (oid) <- (agginvtransfn)\n\t\t  pg_proc (oid) <- (aggprelimfn)\n\t\t  pg_proc (oid) <- (aggtransfn)\n\t\t  pg_type (oid) <- (aggtranstype) \n\t\t*/\n\n\t\tif (HeapTupleIsValid(newtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\tnewhash = 0;\n\t\t\n\t\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_aggregate_aggsortop,  &isnull);\n\t\t\tnewhash = caql_pkhash(pCtx, newhash, d, isnull, OIDOID);\n\t\t\n\t\t\tcaql_lockwell(pCtx, OperatorRelationId, \n\t\t\t\t\t\t  AccessShareLock, newtup,\n\t\t\t\t\t\t  \"pg_operator\",\n\t\t\t\t\t\t  \"oid\",\n\t\t\t\t\t\t  OperatorOidIndexId,\n\t\t\t\t\t\t  newhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\t\tif (HeapTupleIsValid(oldtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\toldhash = 0;\n\t\t\n\t\t\td =
  caql_getattr_internal(pCtx, oldtup, Anum_pg_aggregate_aggsortop,  &isnull);\n\t\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, OIDOID);\n\t\t\n\t\t\tcaql_lockwell(pCtx, OperatorRelationId, \n\t\t\t\t\t\t  AccessShareLock, oldtup,\n\t\t\t\t\t\t  \"pg_operator\",\n\t\t\t\t\t\t  \"oid\",\n\t\t\t\t\t\t  OperatorOidIndexId,\n\t\t\t\t\t\t  oldhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\t\tif (HeapTupleIsValid(newtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\tnewhash = 0;\n\t\t\n\t\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_aggregate_aggfinalfn,  &isnull);\n\t\t\tnewhash = caql_pkhash(pCtx, newhash, d, isnull, OIDOID);\n\t\t\n\t\t\tcaql_lockwell(pCtx, ProcedureRelationId, \n\t\t\t\t\t\t  AccessShareLock, newtup,\n\t\t\t\t\t\t  \"pg_proc\",\n\t\t\t\t\t\t  \"oid\",\n\t\t\t\t\t\t  ProcedureOidIndexId,\n\t\t\t\t\t\t  newhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tupl
 e */\n\t\t\t\t);\n\t\t}\n\t\tif (HeapTupleIsValid(oldtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\toldhash = 0;\n\t\t\n\t\t\td = caql_getattr_internal(pCtx, oldtup, Anum_pg_aggregate_aggfinalfn,  &isnull);\n\t\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, OIDOID);\n\t\t\n\t\t\tcaql_lockwell(pCtx, ProcedureRelationId, \n\t\t\t\t\t\t  AccessShareLock, oldtup,\n\t\t\t\t\t\t  \"pg_proc\",\n\t\t\t\t\t\t  \"oid\",\n\t\t\t\t\t\t  ProcedureOidIndexId,\n\t\t\t\t\t\t  oldhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\t\tif (HeapTupleIsValid(newtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\tnewhash = 0;\n\t\t\n\t\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_aggregate_aggfnoid,  &isnull);\n\t\t\tnewhash = caql_pkhash(pCtx, newhash, d, isnull, OIDOID);\n\t\t\n\t\t\tcaql_lockwell(pCtx, ProcedureRelationId, \n\t\t\t\t\t\t  AccessShareLock, newtup,\n\t\t\t\t\t\t  \"pg_proc\",\n\t\t\t\t\t
 \t  \"oid\",\n\t\t\t\t\t\t  ProcedureOidIndexId,\n\t\t\t\t\t\t  newhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\t\tif (HeapTupleIsValid(oldtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\toldhash = 0;\n\t\t\n\t\t\td = caql_getattr_internal(pCtx, oldtup, Anum_pg_aggregate_aggfnoid,  &isnull);\n\t\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, OIDOID);\n\t\t\n\t\t\tcaql_lockwell(pCtx, ProcedureRelationId, \n\t\t\t\t\t\t  AccessShareLock, oldtup,\n\t\t\t\t\t\t  \"pg_proc\",\n\t\t\t\t\t\t  \"oid\",\n\t\t\t\t\t\t  ProcedureOidIndexId,\n\t\t\t\t\t\t  oldhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\t\tif (HeapTupleIsValid(newtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\tnewhash = 0;\n\t\t\n\t\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_aggregate_agginvprelimfn,  &isnull);\n\t\t\tnewhash = caql_pkhash(pCtx, newhash, d, 
 isnull, OIDOID);\n\t\t\n\t\t\tcaql_lockwell(pCtx, ProcedureRelationId, \n\t\t\t\t\t\t  AccessShareLock, newtup,\n\t\t\t\t\t\t  \"pg_proc\",\n\t\t\t\t\t\t  \"oid\",\n\t\t\t\t\t\t  ProcedureOidIndexId,\n\t\t\t\t\t\t  newhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\t\tif (HeapTupleIsValid(oldtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\toldhash = 0;\n\t\t\n\t\t\td = caql_getattr_internal(pCtx, oldtup, Anum_pg_aggregate_agginvprelimfn,  &isnull);\n\t\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, OIDOID);\n\t\t\n\t\t\tcaql_lockwell(pCtx, ProcedureRelationId, \n\t\t\t\t\t\t  AccessShareLock, oldtup,\n\t\t\t\t\t\t  \"pg_proc\",\n\t\t\t\t\t\t  \"oid\",\n\t\t\t\t\t\t  ProcedureOidIndexId,\n\t\t\t\t\t\t  oldhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\t\tif (HeapTupleIsValid(newtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\tn
 ewhash = 0;\n\t\t\n\t\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_aggregate_agginvtransfn,  &isnull);\n\t\t\tnewhash = caql_pkhash(pCtx, newhash, d, isnull, OIDOID);\n\t\t\n\t\t\tcaql_lockwell(pCtx, ProcedureRelationId, \n\t\t\t\t\t\t  AccessShareLock, newtup,\n\t\t\t\t\t\t  \"pg_proc\",\n\t\t\t\t\t\t  \"oid\",\n\t\t\t\t\t\t  ProcedureOidIndexId,\n\t\t\t\t\t\t  newhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\t\tif (HeapTupleIsValid(oldtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\toldhash = 0;\n\t\t\n\t\t\td = caql_getattr_internal(pCtx, oldtup, Anum_pg_aggregate_agginvtransfn,  &isnull);\n\t\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, OIDOID);\n\t\t\n\t\t\tcaql_lockwell(pCtx, ProcedureRelationId, \n\t\t\t\t\t\t  AccessShareLock, oldtup,\n\t\t\t\t\t\t  \"pg_proc\",\n\t\t\t\t\t\t  \"oid\",\n\t\t\t\t\t\t  ProcedureOidIndexId,\n\t\t\t\t\t\t  oldhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  f
 alse /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\t\tif (HeapTupleIsValid(newtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\tnewhash = 0;\n\t\t\n\t\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_aggregate_aggprelimfn,  &isnull);\n\t\t\tnewhash = caql_pkhash(pCtx, newhash, d, isnull, OIDOID);\n\t\t\n\t\t\tcaql_lockwell(pCtx, ProcedureRelationId, \n\t\t\t\t\t\t  AccessShareLock, newtup,\n\t\t\t\t\t\t  \"pg_proc\",\n\t\t\t\t\t\t  \"oid\",\n\t\t\t\t\t\t  ProcedureOidIndexId,\n\t\t\t\t\t\t  newhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\t\tif (HeapTupleIsValid(oldtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\toldhash = 0;\n\t\t\n\t\t\td = caql_getattr_internal(pCtx, oldtup, Anum_pg_aggregate_aggprelimfn,  &isnull);\n\t\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, OIDOID);\n\t\t\n\t\t\tcaql_lockwell(pCtx, ProcedureRelationId, \n\t\t\t\t\t\t  AccessShareLock, oldtup,\n\
 t\t\t\t\t\t  \"pg_proc\",\n\t\t\t\t\t\t  \"oid\",\n\t\t\t\t\t\t  ProcedureOidIndexId,\n\t\t\t\t\t\t  oldhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\t\tif (HeapTupleIsValid(newtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\tnewhash = 0;\n\t\t\n\t\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_aggregate_aggtransfn,  &isnull);\n\t\t\tnewhash = caql_pkhash(pCtx, newhash, d, isnull, OIDOID);\n\t\t\n\t\t\tcaql_lockwell(pCtx, ProcedureRelationId, \n\t\t\t\t\t\t  AccessShareLock, newtup,\n\t\t\t\t\t\t  \"pg_proc\",\n\t\t\t\t\t\t  \"oid\",\n\t\t\t\t\t\t  ProcedureOidIndexId,\n\t\t\t\t\t\t  newhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\t\tif (HeapTupleIsValid(oldtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\toldhash = 0;\n\t\t\n\t\t\td = caql_getattr_internal(pCtx, oldtup, Anum_pg_aggregate_aggtransfn,  &isnull);\n\t\t\toldha
 sh = caql_pkhash(pCtx, oldhash, d, isnull, OIDOID);\n\t\t\n\t\t\tcaql_lockwell(pCtx, ProcedureRelationId, \n\t\t\t\t\t\t  AccessShareLock, oldtup,\n\t\t\t\t\t\t  \"pg_proc\",\n\t\t\t\t\t\t  \"oid\",\n\t\t\t\t\t\t  ProcedureOidIndexId,\n\t\t\t\t\t\t  oldhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\t\tif (HeapTupleIsValid(newtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\tnewhash = 0;\n\t\t\n\t\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_aggregate_aggtranstype,  &isnull);\n\t\t\tnewhash = caql_pkhash(pCtx, newhash, d, isnull, OIDOID);\n\t\t\n\t\t\tcaql_lockwell(pCtx, TypeRelationId, \n\t\t\t\t\t\t  AccessShareLock, newtup,\n\t\t\t\t\t\t  \"pg_type\",\n\t\t\t\t\t\t  \"oid\",\n\t\t\t\t\t\t  TypeOidIndexId,\n\t\t\t\t\t\t  newhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\t\tif (HeapTupleIsValid(oldtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\
 tisnull;\n\t\t\n\t\t\toldhash = 0;\n\t\t\n\t\t\td = caql_getattr_internal(pCtx, oldtup, Anum_pg_aggregate_aggtranstype,  &isnull);\n\t\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, OIDOID);\n\t\t\n\t\t\tcaql_lockwell(pCtx, TypeRelationId, \n\t\t\t\t\t\t  AccessShareLock, oldtup,\n\t\t\t\t\t\t  \"pg_type\",\n\t\t\t\t\t\t  \"oid\",\n\t\t\t\t\t\t  TypeOidIndexId,\n\t\t\t\t\t\t  oldhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\n\t}\n} /* end caql_iud_fn_3 */\n",
+      "iud_func_name" : "caql_iud_fn_3",
+      "num_del_ops" : 0,
+      "num_ins_ops" : 1,
+      "num_upd_ops" : 0,
+      "tablename" : "pg_aggregate"
+   },
+   "insert into pg_amop" : {
+      "cql" : "cql",
+      "files" : {
+         "../../../..//src/backend/commands/opclasscmds.c" : 1
+      },
+      "foreign_key_tables" : {
+         "pg_opclass" : {
+            "(oid) <- (amopclaid)" : 1
+         },
+         "pg_operator" : {
+            "(oid) <- (amopopr)" : 1
+         },
+         "pg_type" : {
+            "(oid) <- (amopsubtype)" : 1
+         }
+      },
+      "func" : "static\nSysScanDesc\ncaql_basic_fn_4(cqContext *pCtx, cq_list *pcql, bool bLockEntireTable)\n{\n\tRelation\trel;\n\n\tpCtx->cq_relationId = AccessMethodOperatorRelationId;\n\n\tif (!pCtx->cq_externrel)\n\t{\n\t\t\n\t\t{\n\t\t\tpCtx->cq_heap_rel = heap_open(pCtx->cq_relationId, \n\t\t\t\t\t\t\t\t\t\t  pCtx->cq_lockmode);\n\t\t\tpCtx->cq_tupdesc  = RelationGetDescr(pCtx->cq_heap_rel);\n\t\t}\n\t}\n\telse\n\t{\n\t\t/* make sure the supplied relation matches the caql */\n\t\tif (RelationIsValid(pCtx->cq_heap_rel))\n\t\t{\n\t\t\tAssert(AccessMethodOperatorRelationId == \n\t\t\t\t   RelationGetRelid(pCtx->cq_heap_rel));\n\t\t\tpCtx->cq_tupdesc  = RelationGetDescr(pCtx->cq_heap_rel);\n\t\t}\n\n\t}\t\t\n\n\trel = pCtx->cq_heap_rel;\n\n\treturn NULL; /* XXX XXX: don't init scan */\n}\n",
+      "func_name" : "caql_basic_fn_4",
+      "func_note" : "",
+      "func_number" : "4",
+      "indexes" : {},
+      "iud_func" : "\nstatic\nvoid caql_iud_fn_4(cqContext *pCtx, int is_iud, \n\t\t\t\t\t HeapTuple oldtup, HeapTuple newtup, bool dontWait,\n\t\t\t\t\t LOCKMODE pklockmode)\n{\n\tOid oldhash = 0;\n\tOid newhash = 0;\n\n\tif (HeapTupleIsValid(oldtup))\n\t{\n\t\tif (!pCtx->cq_setpklock)\n\t\t\tAssert(RelationIsValid(pCtx->cq_heap_rel));\n\t\n\t\toldhash = 0;\n\t}\n\tif (HeapTupleIsValid(newtup))\n\t{\n\t\tif (!pCtx->cq_setpklock)\n\t\t\tAssert(RelationIsValid(pCtx->cq_heap_rel));\n\t\n\t\tnewhash = 0;\n\t}\n\n\t/*\n\t2 unique indexes:\n\tAccessMethodStrategyIndexId: amopclaid, amopsubtype, amopstrategy\n\tAccessMethodOperatorIndexId: amopopr, amopclaid\n\t*/\n\tif (HeapTupleIsValid(newtup))\n\t{\n\t\tDatum\t\td;\n\t\tbool\t\tisnull;\n\t\n\t\tnewhash = 0;\n\t\n\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_amop_amopclaid,  &isnull);\n\t\tnewhash = caql_pkhash(pCtx, newhash, d, isnull, OIDOID);\n\t\t\n\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_amop_amopsubtype,  &isnull)
 ;\n\t\tnewhash = caql_pkhash(pCtx, newhash, d, isnull, OIDOID);\n\t\t\n\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_amop_amopstrategy,  &isnull);\n\t\tnewhash = caql_pkhash(pCtx, newhash, d, isnull, INT2OID);\n\t\n\t\tcaql_lockwell(pCtx, AccessMethodOperatorRelationId, \n\t\t\t\t\t  pklockmode, newtup,\n\t\t\t\t\t  \"pg_amop\",\n\t\t\t\t\t  \"amopclaid, amopsubtype, amopstrategy\",\n\t\t\t\t\t  AccessMethodStrategyIndexId,\n\t\t\t\t\t  newhash,\n\t\t\t\t\t  dontWait,\n\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t);\n\t}\n\tif (HeapTupleIsValid(oldtup))\n\t{\n\t\tDatum\t\td;\n\t\tbool\t\tisnull;\n\t\n\t\toldhash = 0;\n\t\n\t\td = caql_getattr_internal(pCtx, oldtup, Anum_pg_amop_amopclaid,  &isnull);\n\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, OIDOID);\n\t\t\n\t\td = caql_getattr_internal(pCtx, oldtup, Anum_pg_amop_amopsubtype,  &isnull);\n\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, OIDOID);\n\t\t\n\t\td = caql_getattr_internal(pCtx, oldtup, Anum_p
 g_amop_amopstrategy,  &isnull);\n\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, INT2OID);\n\t\n\t\tcaql_lockwell(pCtx, AccessMethodOperatorRelationId, \n\t\t\t\t\t  pklockmode, oldtup,\n\t\t\t\t\t  \"pg_amop\",\n\t\t\t\t\t  \"amopclaid, amopsubtype, amopstrategy\",\n\t\t\t\t\t  AccessMethodStrategyIndexId,\n\t\t\t\t\t  oldhash,\n\t\t\t\t\t  dontWait,\n\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t);\n\t}\n\tif (HeapTupleIsValid(newtup))\n\t{\n\t\tDatum\t\td;\n\t\tbool\t\tisnull;\n\t\n\t\tnewhash = 0;\n\t\n\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_amop_amopopr,  &isnull);\n\t\tnewhash = caql_pkhash(pCtx, newhash, d, isnull, OIDOID);\n\t\t\n\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_amop_amopclaid,  &isnull);\n\t\tnewhash = caql_pkhash(pCtx, newhash, d, isnull, OIDOID);\n\t\n\t\tcaql_lockwell(pCtx, AccessMethodOperatorRelationId, \n\t\t\t\t\t  pklockmode, newtup,\n\t\t\t\t\t  \"pg_amop\",\n\t\t\t\t\t  \"amopopr, amopclaid\",\n\t\t\t\t\t  AccessMetho
 dOperatorIndexId,\n\t\t\t\t\t  newhash,\n\t\t\t\t\t  dontWait,\n\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t);\n\t}\n\tif (HeapTupleIsValid(oldtup))\n\t{\n\t\tDatum\t\td;\n\t\tbool\t\tisnull;\n\t\n\t\toldhash = 0;\n\t\n\t\td = caql_getattr_internal(pCtx, oldtup, Anum_pg_amop_amopopr,  &isnull);\n\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, OIDOID);\n\t\t\n\t\td = caql_getattr_internal(pCtx, oldtup, Anum_pg_amop_amopclaid,  &isnull);\n\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, OIDOID);\n\t\n\t\tcaql_lockwell(pCtx, AccessMethodOperatorRelationId, \n\t\t\t\t\t  pklockmode, oldtup,\n\t\t\t\t\t  \"pg_amop\",\n\t\t\t\t\t  \"amopopr, amopclaid\",\n\t\t\t\t\t  AccessMethodOperatorIndexId,\n\t\t\t\t\t  oldhash,\n\t\t\t\t\t  dontWait,\n\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t);\n\t}\n\n\n\t/* NOTE: don't get fk locks if only needed share locks on pk */\n\tif (pklockmode != AccessExclusiveLock)\n\t\treturn;\n\n\tif (!is_iud)\n\t{\n\t\t\n\t}\n\tel
 se\n\t{\n\t\tdontWait = true; /* never wait for share locks on foreign keys */\n\t\t/* \n\t\t  if insert/update, check foreign keys against:\t\n\t\t  pg_opclass (oid) <- (amopclaid)\n\t\t  pg_operator (oid) <- (amopopr)\n\t\t  pg_type (oid) <- (amopsubtype) \n\t\t*/\n\n\t\tif (HeapTupleIsValid(newtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\tnewhash = 0;\n\t\t\n\t\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_amop_amopclaid,  &isnull);\n\t\t\tnewhash = caql_pkhash(pCtx, newhash, d, isnull, OIDOID);\n\t\t\n\t\t\tcaql_lockwell(pCtx, OperatorClassRelationId, \n\t\t\t\t\t\t  AccessShareLock, newtup,\n\t\t\t\t\t\t  \"pg_opclass\",\n\t\t\t\t\t\t  \"oid\",\n\t\t\t\t\t\t  OpclassOidIndexId,\n\t\t\t\t\t\t  newhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\t\tif (HeapTupleIsValid(oldtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\toldhash = 0;\n\t\t\n\t\t\td = caql_getattr_internal(pCtx, o
 ldtup, Anum_pg_amop_amopclaid,  &isnull);\n\t\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, OIDOID);\n\t\t\n\t\t\tcaql_lockwell(pCtx, OperatorClassRelationId, \n\t\t\t\t\t\t  AccessShareLock, oldtup,\n\t\t\t\t\t\t  \"pg_opclass\",\n\t\t\t\t\t\t  \"oid\",\n\t\t\t\t\t\t  OpclassOidIndexId,\n\t\t\t\t\t\t  oldhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\t\tif (HeapTupleIsValid(newtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\tnewhash = 0;\n\t\t\n\t\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_amop_amopopr,  &isnull);\n\t\t\tnewhash = caql_pkhash(pCtx, newhash, d, isnull, OIDOID);\n\t\t\n\t\t\tcaql_lockwell(pCtx, OperatorRelationId, \n\t\t\t\t\t\t  AccessShareLock, newtup,\n\t\t\t\t\t\t  \"pg_operator\",\n\t\t\t\t\t\t  \"oid\",\n\t\t\t\t\t\t  OperatorOidIndexId,\n\t\t\t\t\t\t  newhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\t\tif (HeapT
 upleIsValid(oldtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\toldhash = 0;\n\t\t\n\t\t\td = caql_getattr_internal(pCtx, oldtup, Anum_pg_amop_amopopr,  &isnull);\n\t\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, OIDOID);\n\t\t\n\t\t\tcaql_lockwell(pCtx, OperatorRelationId, \n\t\t\t\t\t\t  AccessShareLock, oldtup,\n\t\t\t\t\t\t  \"pg_operator\",\n\t\t\t\t\t\t  \"oid\",\n\t\t\t\t\t\t  OperatorOidIndexId,\n\t\t\t\t\t\t  oldhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\t\tif (HeapTupleIsValid(newtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\tnewhash = 0;\n\t\t\n\t\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_amop_amopsubtype,  &isnull);\n\t\t\tnewhash = caql_pkhash(pCtx, newhash, d, isnull, OIDOID);\n\t\t\n\t\t\tcaql_lockwell(pCtx, TypeRelationId, \n\t\t\t\t\t\t  AccessShareLock, newtup,\n\t\t\t\t\t\t  \"pg_type\",\n\t\t\t\t\t\t  \"oid\",\n\t\t\t\t\t\t  TypeOidIndexId,\n\t\t\t
 \t\t\t  newhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\t\tif (HeapTupleIsValid(oldtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\toldhash = 0;\n\t\t\n\t\t\td = caql_getattr_internal(pCtx, oldtup, Anum_pg_amop_amopsubtype,  &isnull);\n\t\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, OIDOID);\n\t\t\n\t\t\tcaql_lockwell(pCtx, TypeRelationId, \n\t\t\t\t\t\t  AccessShareLock, oldtup,\n\t\t\t\t\t\t  \"pg_type\",\n\t\t\t\t\t\t  \"oid\",\n\t\t\t\t\t\t  TypeOidIndexId,\n\t\t\t\t\t\t  oldhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\n\t}\n} /* end caql_iud_fn_4 */\n",
+      "iud_func_name" : "caql_iud_fn_4",
+      "num_del_ops" : 0,
+      "num_ins_ops" : 1,
+      "num_upd_ops" : 0,
+      "tablename" : "pg_amop"
+   },
+   "insert into pg_amproc" : {
+      "cql" : "cql",
+      "files" : {
+         "../../../..//src/backend/commands/opclasscmds.c" : 1
+      },
+      "foreign_key_tables" : {
+         "pg_opclass" : {
+            "(oid) <- (amopclaid)" : 1
+         },
+         "pg_proc" : {
+            "(oid) <- (amproc)" : 1
+         },
+         "pg_type" : {
+            "(oid) <- (amprocsubtype)" : 1
+         }
+      },
+      "func" : "static\nSysScanDesc\ncaql_basic_fn_5(cqContext *pCtx, cq_list *pcql, bool bLockEntireTable)\n{\n\tRelation\trel;\n\n\tpCtx->cq_relationId = AccessMethodProcedureRelationId;\n\n\tif (!pCtx->cq_externrel)\n\t{\n\t\t\n\t\t{\n\t\t\tpCtx->cq_heap_rel = heap_open(pCtx->cq_relationId, \n\t\t\t\t\t\t\t\t\t\t  pCtx->cq_lockmode);\n\t\t\tpCtx->cq_tupdesc  = RelationGetDescr(pCtx->cq_heap_rel);\n\t\t}\n\t}\n\telse\n\t{\n\t\t/* make sure the supplied relation matches the caql */\n\t\tif (RelationIsValid(pCtx->cq_heap_rel))\n\t\t{\n\t\t\tAssert(AccessMethodProcedureRelationId == \n\t\t\t\t   RelationGetRelid(pCtx->cq_heap_rel));\n\t\t\tpCtx->cq_tupdesc  = RelationGetDescr(pCtx->cq_heap_rel);\n\t\t}\n\n\t}\t\t\n\n\trel = pCtx->cq_heap_rel;\n\n\treturn NULL; /* XXX XXX: don't init scan */\n}\n",
+      "func_name" : "caql_basic_fn_5",
+      "func_note" : "",
+      "func_number" : "5",
+      "indexes" : {},
+      "iud_func" : "\nstatic\nvoid caql_iud_fn_5(cqContext *pCtx, int is_iud, \n\t\t\t\t\t HeapTuple oldtup, HeapTuple newtup, bool dontWait,\n\t\t\t\t\t LOCKMODE pklockmode)\n{\n\tOid oldhash = 0;\n\tOid newhash = 0;\n\n\tif (HeapTupleIsValid(oldtup))\n\t{\n\t\tif (!pCtx->cq_setpklock)\n\t\t\tAssert(RelationIsValid(pCtx->cq_heap_rel));\n\t\n\t\toldhash = 0;\n\t}\n\tif (HeapTupleIsValid(newtup))\n\t{\n\t\tif (!pCtx->cq_setpklock)\n\t\t\tAssert(RelationIsValid(pCtx->cq_heap_rel));\n\t\n\t\tnewhash = 0;\n\t}\n\n\t/*\n\t1 unique index:\n\tAccessMethodProcedureIndexId: amopclaid, amprocsubtype, amprocnum\n\t*/\n\tif (HeapTupleIsValid(newtup))\n\t{\n\t\tDatum\t\td;\n\t\tbool\t\tisnull;\n\t\n\t\tnewhash = 0;\n\t\n\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_amproc_amopclaid,  &isnull);\n\t\tnewhash = caql_pkhash(pCtx, newhash, d, isnull, OIDOID);\n\t\t\n\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_amproc_amprocsubtype,  &isnull);\n\t\tnewhash = caql_pkhash(pCtx, newhash, d, 
 isnull, OIDOID);\n\t\t\n\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_amproc_amprocnum,  &isnull);\n\t\tnewhash = caql_pkhash(pCtx, newhash, d, isnull, INT2OID);\n\t\n\t\tcaql_lockwell(pCtx, AccessMethodProcedureRelationId, \n\t\t\t\t\t  pklockmode, newtup,\n\t\t\t\t\t  \"pg_amproc\",\n\t\t\t\t\t  \"amopclaid, amprocsubtype, amprocnum\",\n\t\t\t\t\t  AccessMethodProcedureIndexId,\n\t\t\t\t\t  newhash,\n\t\t\t\t\t  dontWait,\n\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t);\n\t}\n\tif (HeapTupleIsValid(oldtup))\n\t{\n\t\tDatum\t\td;\n\t\tbool\t\tisnull;\n\t\n\t\toldhash = 0;\n\t\n\t\td = caql_getattr_internal(pCtx, oldtup, Anum_pg_amproc_amopclaid,  &isnull);\n\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, OIDOID);\n\t\t\n\t\td = caql_getattr_internal(pCtx, oldtup, Anum_pg_amproc_amprocsubtype,  &isnull);\n\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, OIDOID);\n\t\t\n\t\td = caql_getattr_internal(pCtx, oldtup, Anum_pg_amproc_amprocnum,  &isnull);\n\t\told
 hash = caql_pkhash(pCtx, oldhash, d, isnull, INT2OID);\n\t\n\t\tcaql_lockwell(pCtx, AccessMethodProcedureRelationId, \n\t\t\t\t\t  pklockmode, oldtup,\n\t\t\t\t\t  \"pg_amproc\",\n\t\t\t\t\t  \"amopclaid, amprocsubtype, amprocnum\",\n\t\t\t\t\t  AccessMethodProcedureIndexId,\n\t\t\t\t\t  oldhash,\n\t\t\t\t\t  dontWait,\n\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t);\n\t}\n\n\n\t/* NOTE: don't get fk locks if only needed share locks on pk */\n\tif (pklockmode != AccessExclusiveLock)\n\t\treturn;\n\n\tif (!is_iud)\n\t{\n\t\t\n\t}\n\telse\n\t{\n\t\tdontWait = true; /* never wait for share locks on foreign keys */\n\t\t/* \n\t\t  if insert/update, check foreign keys against:\t\n\t\t  pg_opclass (oid) <- (amopclaid)\n\t\t  pg_proc (oid) <- (amproc)\n\t\t  pg_type (oid) <- (amprocsubtype) \n\t\t*/\n\n\t\tif (HeapTupleIsValid(newtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\tnewhash = 0;\n\t\t\n\t\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_amproc_
 amopclaid,  &isnull);\n\t\t\tnewhash = caql_pkhash(pCtx, newhash, d, isnull, OIDOID);\n\t\t\n\t\t\tcaql_lockwell(pCtx, OperatorClassRelationId, \n\t\t\t\t\t\t  AccessShareLock, newtup,\n\t\t\t\t\t\t  \"pg_opclass\",\n\t\t\t\t\t\t  \"oid\",\n\t\t\t\t\t\t  OpclassOidIndexId,\n\t\t\t\t\t\t  newhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\t\tif (HeapTupleIsValid(oldtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\toldhash = 0;\n\t\t\n\t\t\td = caql_getattr_internal(pCtx, oldtup, Anum_pg_amproc_amopclaid,  &isnull);\n\t\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, OIDOID);\n\t\t\n\t\t\tcaql_lockwell(pCtx, OperatorClassRelationId, \n\t\t\t\t\t\t  AccessShareLock, oldtup,\n\t\t\t\t\t\t  \"pg_opclass\",\n\t\t\t\t\t\t  \"oid\",\n\t\t\t\t\t\t  OpclassOidIndexId,\n\t\t\t\t\t\t  oldhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\t\tif (HeapTupleIsValid(n
 ewtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\tnewhash = 0;\n\t\t\n\t\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_amproc_amproc,  &isnull);\n\t\t\tnewhash = caql_pkhash(pCtx, newhash, d, isnull, OIDOID);\n\t\t\n\t\t\tcaql_lockwell(pCtx, ProcedureRelationId, \n\t\t\t\t\t\t  AccessShareLock, newtup,\n\t\t\t\t\t\t  \"pg_proc\",\n\t\t\t\t\t\t  \"oid\",\n\t\t\t\t\t\t  ProcedureOidIndexId,\n\t\t\t\t\t\t  newhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\t\tif (HeapTupleIsValid(oldtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\toldhash = 0;\n\t\t\n\t\t\td = caql_getattr_internal(pCtx, oldtup, Anum_pg_amproc_amproc,  &isnull);\n\t\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, OIDOID);\n\t\t\n\t\t\tcaql_lockwell(pCtx, ProcedureRelationId, \n\t\t\t\t\t\t  AccessShareLock, oldtup,\n\t\t\t\t\t\t  \"pg_proc\",\n\t\t\t\t\t\t  \"oid\",\n\t\t\t\t\t\t  ProcedureOidIndexId,\n\t\t\t\t\t\t 
  oldhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\t\tif (HeapTupleIsValid(newtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\tnewhash = 0;\n\t\t\n\t\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_amproc_amprocsubtype,  &isnull);\n\t\t\tnewhash = caql_pkhash(pCtx, newhash, d, isnull, OIDOID);\n\t\t\n\t\t\tcaql_lockwell(pCtx, TypeRelationId, \n\t\t\t\t\t\t  AccessShareLock, newtup,\n\t\t\t\t\t\t  \"pg_type\",\n\t\t\t\t\t\t  \"oid\",\n\t\t\t\t\t\t  TypeOidIndexId,\n\t\t\t\t\t\t  newhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\t\tif (HeapTupleIsValid(oldtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\toldhash = 0;\n\t\t\n\t\t\td = caql_getattr_internal(pCtx, oldtup, Anum_pg_amproc_amprocsubtype,  &isnull);\n\t\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, OIDOID);\n\t\t\n\t\t\tcaql_lockwell(pCtx, TypeRelationId, \n\t\t\t\
 t\t\t  AccessShareLock, oldtup,\n\t\t\t\t\t\t  \"pg_type\",\n\t\t\t\t\t\t  \"oid\",\n\t\t\t\t\t\t  TypeOidIndexId,\n\t\t\t\t\t\t  oldhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\n\t}\n} /* end caql_iud_fn_5 */\n",
+      "iud_func_name" : "caql_iud_fn_5",
+      "num_del_ops" : 0,
+      "num_ins_ops" : 1,
+      "num_upd_ops" : 0,
+      "tablename" : "pg_amproc"
+   },
+   "insert into pg_appendonly" : {
+      "cql" : "cql",
+      "files" : {
+         "../../../..//src/backend/catalog/pg_appendonly.c" : 1
+      },
+      "foreign_key_tables" : {
+         "pg_class" : {
+            "(oid) <- (relid)" : 1
+         }
+      },
+      "func" : "static\nSysScanDesc\ncaql_basic_fn_6(cqContext *pCtx, cq_list *pcql, bool bLockEntireTable)\n{\n\tRelation\trel;\n\n\tpCtx->cq_relationId = AppendOnlyRelationId;\n\n\tif (!pCtx->cq_externrel)\n\t{\n\t\t\n\t\t{\n\t\t\tpCtx->cq_heap_rel = heap_open(pCtx->cq_relationId, \n\t\t\t\t\t\t\t\t\t\t  pCtx->cq_lockmode);\n\t\t\tpCtx->cq_tupdesc  = RelationGetDescr(pCtx->cq_heap_rel);\n\t\t}\n\t}\n\telse\n\t{\n\t\t/* make sure the supplied relation matches the caql */\n\t\tif (RelationIsValid(pCtx->cq_heap_rel))\n\t\t{\n\t\t\tAssert(AppendOnlyRelationId == \n\t\t\t\t   RelationGetRelid(pCtx->cq_heap_rel));\n\t\t\tpCtx->cq_tupdesc  = RelationGetDescr(pCtx->cq_heap_rel);\n\t\t}\n\n\t}\t\t\n\n\trel = pCtx->cq_heap_rel;\n\n\treturn NULL; /* XXX XXX: don't init scan */\n}\n",
+      "func_name" : "caql_basic_fn_6",
+      "func_note" : "",
+      "func_number" : "6",
+      "indexes" : {},
+      "iud_func" : "\nstatic\nvoid caql_iud_fn_6(cqContext *pCtx, int is_iud, \n\t\t\t\t\t HeapTuple oldtup, HeapTuple newtup, bool dontWait,\n\t\t\t\t\t LOCKMODE pklockmode)\n{\n\tOid oldhash = 0;\n\tOid newhash = 0;\n\n\tif (HeapTupleIsValid(oldtup))\n\t{\n\t\tif (!pCtx->cq_setpklock)\n\t\t\tAssert(RelationIsValid(pCtx->cq_heap_rel));\n\t\n\t\toldhash = 0;\n\t}\n\tif (HeapTupleIsValid(newtup))\n\t{\n\t\tif (!pCtx->cq_setpklock)\n\t\t\tAssert(RelationIsValid(pCtx->cq_heap_rel));\n\t\n\t\tnewhash = 0;\n\t}\n\n\t/*\n\t1 unique index:\n\tAppendOnlyRelidIndexId: relid\n\t*/\n\tif (HeapTupleIsValid(newtup))\n\t{\n\t\tDatum\t\td;\n\t\tbool\t\tisnull;\n\t\n\t\tnewhash = 0;\n\t\n\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_appendonly_relid,  &isnull);\n\t\tnewhash = caql_pkhash(pCtx, newhash, d, isnull, OIDOID);\n\t\n\t\tcaql_lockwell(pCtx, AppendOnlyRelationId, \n\t\t\t\t\t  pklockmode, newtup,\n\t\t\t\t\t  \"pg_appendonly\",\n\t\t\t\t\t  \"relid\",\n\t\t\t\t\t  AppendOnlyRelidInde
 xId,\n\t\t\t\t\t  newhash,\n\t\t\t\t\t  dontWait,\n\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t);\n\t}\n\tif (HeapTupleIsValid(oldtup))\n\t{\n\t\tDatum\t\td;\n\t\tbool\t\tisnull;\n\t\n\t\toldhash = 0;\n\t\n\t\td = caql_getattr_internal(pCtx, oldtup, Anum_pg_appendonly_relid,  &isnull);\n\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, OIDOID);\n\t\n\t\tcaql_lockwell(pCtx, AppendOnlyRelationId, \n\t\t\t\t\t  pklockmode, oldtup,\n\t\t\t\t\t  \"pg_appendonly\",\n\t\t\t\t\t  \"relid\",\n\t\t\t\t\t  AppendOnlyRelidIndexId,\n\t\t\t\t\t  oldhash,\n\t\t\t\t\t  dontWait,\n\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t);\n\t}\n\n\n\t/* NOTE: don't get fk locks if only needed share locks on pk */\n\tif (pklockmode != AccessExclusiveLock)\n\t\treturn;\n\n\tif (!is_iud)\n\t{\n\t\t\n\t}\n\telse\n\t{\n\t\tdontWait = true; /* never wait for share locks on foreign keys */\n\t\t/* \n\t\t  if insert/update, check foreign keys against:\t\n\t\t  pg_class (oid) <- (relid) \n\
 t\t*/\n\n\t\tif (HeapTupleIsValid(newtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\tnewhash = 0;\n\t\t\n\t\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_appendonly_relid,  &isnull);\n\t\t\tnewhash = caql_pkhash(pCtx, newhash, d, isnull, OIDOID);\n\t\t\n\t\t\tcaql_lockwell(pCtx, RelationRelationId, \n\t\t\t\t\t\t  AccessShareLock, newtup,\n\t\t\t\t\t\t  \"pg_class\",\n\t\t\t\t\t\t  \"oid\",\n\t\t\t\t\t\t  ClassOidIndexId,\n\t\t\t\t\t\t  newhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\t\tif (HeapTupleIsValid(oldtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\toldhash = 0;\n\t\t\n\t\t\td = caql_getattr_internal(pCtx, oldtup, Anum_pg_appendonly_relid,  &isnull);\n\t\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, OIDOID);\n\t\t\n\t\t\tcaql_lockwell(pCtx, RelationRelationId, \n\t\t\t\t\t\t  AccessShareLock, oldtup,\n\t\t\t\t\t\t  \"pg_class\",\n\t\t\t\t\t\t  \"oid\",\n\t\t\t\t\t\t
   ClassOidIndexId,\n\t\t\t\t\t\t  oldhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\n\t}\n} /* end caql_iud_fn_6 */\n",
+      "iud_func_name" : "caql_iud_fn_6",
+      "num_del_ops" : 0,
+      "num_ins_ops" : 1,
+      "num_upd_ops" : 0,
+      "tablename" : "pg_appendonly"
+   },
+   "insert into pg_attrdef" : {
+      "cql" : "cql",
+      "files" : {
+         "../../../..//src/backend/catalog/heap.c" : 1
+      },
+      "foreign_key_tables" : {
+         "pg_attribute" : {
+            "(attrelid) <- (adrelid)" : 1
+         }
+      },
+      "func" : "static\nSysScanDesc\ncaql_basic_fn_7(cqContext *pCtx, cq_list *pcql, bool bLockEntireTable)\n{\n\tRelation\trel;\n\n\tpCtx->cq_relationId = AttrDefaultRelationId;\n\n\tif (!pCtx->cq_externrel)\n\t{\n\t\t\n\t\t{\n\t\t\tpCtx->cq_heap_rel = heap_open(pCtx->cq_relationId, \n\t\t\t\t\t\t\t\t\t\t  pCtx->cq_lockmode);\n\t\t\tpCtx->cq_tupdesc  = RelationGetDescr(pCtx->cq_heap_rel);\n\t\t}\n\t}\n\telse\n\t{\n\t\t/* make sure the supplied relation matches the caql */\n\t\tif (RelationIsValid(pCtx->cq_heap_rel))\n\t\t{\n\t\t\tAssert(AttrDefaultRelationId == \n\t\t\t\t   RelationGetRelid(pCtx->cq_heap_rel));\n\t\t\tpCtx->cq_tupdesc  = RelationGetDescr(pCtx->cq_heap_rel);\n\t\t}\n\n\t}\t\t\n\n\trel = pCtx->cq_heap_rel;\n\n\treturn NULL; /* XXX XXX: don't init scan */\n}\n",
+      "func_name" : "caql_basic_fn_7",
+      "func_note" : "",
+      "func_number" : "7",
+      "indexes" : {},
+      "iud_func" : "\nstatic\nvoid caql_iud_fn_7(cqContext *pCtx, int is_iud, \n\t\t\t\t\t HeapTuple oldtup, HeapTuple newtup, bool dontWait,\n\t\t\t\t\t LOCKMODE pklockmode)\n{\n\tOid oldhash = 0;\n\tOid newhash = 0;\n\n\tif (HeapTupleIsValid(oldtup))\n\t{\n\t\tif (!pCtx->cq_setpklock)\n\t\t\tAssert(RelationIsValid(pCtx->cq_heap_rel));\n\t\n\t\toldhash = 0;\n\t}\n\tif (HeapTupleIsValid(newtup))\n\t{\n\t\tif (!pCtx->cq_setpklock)\n\t\t\tAssert(RelationIsValid(pCtx->cq_heap_rel));\n\t\n\t\tnewhash = 0;\n\t}\n\n\t/*\n\t2 unique indexes:\n\tAttrDefaultIndexId: adrelid, adnum\n\tAttrDefaultOidIndexId: oid\n\t*/\n\tif (HeapTupleIsValid(newtup))\n\t{\n\t\tDatum\t\td;\n\t\tbool\t\tisnull;\n\t\n\t\tnewhash = 0;\n\t\n\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_attrdef_adrelid,  &isnull);\n\t\tnewhash = caql_pkhash(pCtx, newhash, d, isnull, OIDOID);\n\t\t\n\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_attrdef_adnum,  &isnull);\n\t\tnewhash = caql_pkhash(pCtx, newhash, d, isnull,
  INT2OID);\n\t\n\t\tcaql_lockwell(pCtx, AttrDefaultRelationId, \n\t\t\t\t\t  pklockmode, newtup,\n\t\t\t\t\t  \"pg_attrdef\",\n\t\t\t\t\t  \"adrelid, adnum\",\n\t\t\t\t\t  AttrDefaultIndexId,\n\t\t\t\t\t  newhash,\n\t\t\t\t\t  dontWait,\n\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t);\n\t}\n\tif (HeapTupleIsValid(oldtup))\n\t{\n\t\tDatum\t\td;\n\t\tbool\t\tisnull;\n\t\n\t\toldhash = 0;\n\t\n\t\td = caql_getattr_internal(pCtx, oldtup, Anum_pg_attrdef_adrelid,  &isnull);\n\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, OIDOID);\n\t\t\n\t\td = caql_getattr_internal(pCtx, oldtup, Anum_pg_attrdef_adnum,  &isnull);\n\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, INT2OID);\n\t\n\t\tcaql_lockwell(pCtx, AttrDefaultRelationId, \n\t\t\t\t\t  pklockmode, oldtup,\n\t\t\t\t\t  \"pg_attrdef\",\n\t\t\t\t\t  \"adrelid, adnum\",\n\t\t\t\t\t  AttrDefaultIndexId,\n\t\t\t\t\t  oldhash,\n\t\t\t\t\t  dontWait,\n\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t);\n\t}\n\tif (
 HeapTupleIsValid(newtup))\n\t{\n\t\tDatum\t\td;\n\t\tbool\t\tisnull;\n\t\n\t\tnewhash = 0;\n\t\n\t\td = caql_getattr_internal(pCtx, newtup, ObjectIdAttributeNumber,  &isnull);\n\t\tnewhash = caql_pkhash(pCtx, newhash, d, isnull, OIDOID);\n\t\n\t\tcaql_lockwell(pCtx, AttrDefaultRelationId, \n\t\t\t\t\t  pklockmode, newtup,\n\t\t\t\t\t  \"pg_attrdef\",\n\t\t\t\t\t  \"oid\",\n\t\t\t\t\t  AttrDefaultOidIndexId,\n\t\t\t\t\t  newhash,\n\t\t\t\t\t  dontWait,\n\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t);\n\t}\n\tif (HeapTupleIsValid(oldtup))\n\t{\n\t\tDatum\t\td;\n\t\tbool\t\tisnull;\n\t\n\t\toldhash = 0;\n\t\n\t\td = caql_getattr_internal(pCtx, oldtup, ObjectIdAttributeNumber,  &isnull);\n\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, OIDOID);\n\t\n\t\tcaql_lockwell(pCtx, AttrDefaultRelationId, \n\t\t\t\t\t  pklockmode, oldtup,\n\t\t\t\t\t  \"pg_attrdef\",\n\t\t\t\t\t  \"oid\",\n\t\t\t\t\t  AttrDefaultOidIndexId,\n\t\t\t\t\t  oldhash,\n\t\t\t\t\t  dontWait,\n\t\t\t\t\t
   false /* don't ignore invalid tuple */\n\t\t\t);\n\t}\n\n\n\t/* NOTE: don't get fk locks if only needed share locks on pk */\n\tif (pklockmode != AccessExclusiveLock)\n\t\treturn;\n\n\tif (!is_iud)\n\t{\n\t\t\n\t}\n\telse\n\t{\n\t\tdontWait = true; /* never wait for share locks on foreign keys */\n\t\t/* \n\t\t  if insert/update, check foreign keys against:\t\n\t\t  pg_attribute (attrelid) <- (adrelid) \n\t\t*/\n\n\t\tif (HeapTupleIsValid(newtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\tnewhash = 0;\n\t\t\n\t\t\t{ d = 0; isnull = 0; }\n\t\t\tcaql_lockwell(pCtx, AttributeRelationId, \n\t\t\t\t\t\t  AccessShareLock, newtup,\n\t\t\t\t\t\t  \"pg_attribute\",\n\t\t\t\t\t\t  \"attrelid\",\n\t\t\t\t\t\t  InvalidOid,\n\t\t\t\t\t\t  newhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\t\tif (HeapTupleIsValid(oldtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\toldhash = 0;\n\t\t\n\t\t\t{ d = 0; 
 isnull = 0; }\n\t\t\tcaql_lockwell(pCtx, AttributeRelationId, \n\t\t\t\t\t\t  AccessShareLock, oldtup,\n\t\t\t\t\t\t  \"pg_attribute\",\n\t\t\t\t\t\t  \"attrelid\",\n\t\t\t\t\t\t  InvalidOid,\n\t\t\t\t\t\t  oldhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\n\t}\n} /* end caql_iud_fn_7 */\n",
+      "iud_func_name" : "caql_iud_fn_7",
+      "num_del_ops" : 0,
+      "num_ins_ops" : 1,
+      "num_upd_ops" : 0,
+      "tablename" : "pg_attrdef"
+   },
+   "insert into pg_attribute" : {
+      "cql" : "cql",
+      "files" : {
+         "../../../..//src/backend/catalog/heap.c" : 1,
+         "../../../..//src/backend/catalog/index.c" : 1,
+         "../../../..//src/backend/commands/tablecmds.c" : 1
+      },
+      "foreign_key_tables" : {
+         "pg_class" : {
+            "(oid) <- (attrelid)" : 1
+         },
+         "pg_type" : {
+            "(oid) <- (atttypid)" : 1
+         }
+      },
+      "func" : "static\nSysScanDesc\ncaql_basic_fn_8(cqContext *pCtx, cq_list *pcql, bool bLockEntireTable)\n{\n\tRelation\trel;\n\n\tpCtx->cq_relationId = AttributeRelationId;\n\n\tif (!pCtx->cq_externrel)\n\t{\n\t\t\n\t\t{\n\t\t\tpCtx->cq_heap_rel = heap_open(pCtx->cq_relationId, \n\t\t\t\t\t\t\t\t\t\t  pCtx->cq_lockmode);\n\t\t\tpCtx->cq_tupdesc  = RelationGetDescr(pCtx->cq_heap_rel);\n\t\t}\n\t}\n\telse\n\t{\n\t\t/* make sure the supplied relation matches the caql */\n\t\tif (RelationIsValid(pCtx->cq_heap_rel))\n\t\t{\n\t\t\tAssert(AttributeRelationId == \n\t\t\t\t   RelationGetRelid(pCtx->cq_heap_rel));\n\t\t\tpCtx->cq_tupdesc  = RelationGetDescr(pCtx->cq_heap_rel);\n\t\t}\n\n\t}\t\t\n\n\trel = pCtx->cq_heap_rel;\n\n\treturn NULL; /* XXX XXX: don't init scan */\n}\n",
+      "func_name" : "caql_basic_fn_8",
+      "func_note" : "",
+      "func_number" : "8",
+      "indexes" : {},
+      "iud_func" : "\nstatic\nvoid caql_iud_fn_8(cqContext *pCtx, int is_iud, \n\t\t\t\t\t HeapTuple oldtup, HeapTuple newtup, bool dontWait,\n\t\t\t\t\t LOCKMODE pklockmode)\n{\n\tOid oldhash = 0;\n\tOid newhash = 0;\n\n\tif (HeapTupleIsValid(oldtup))\n\t{\n\t\tif (!pCtx->cq_setpklock)\n\t\t\tAssert(RelationIsValid(pCtx->cq_heap_rel));\n\t\n\t\toldhash = 0;\n\t}\n\tif (HeapTupleIsValid(newtup))\n\t{\n\t\tif (!pCtx->cq_setpklock)\n\t\t\tAssert(RelationIsValid(pCtx->cq_heap_rel));\n\t\n\t\tnewhash = 0;\n\t}\n\n\t/*\n\t2 unique indexes:\n\tAttributeRelidNameIndexId: attrelid, attname\n\tAttributeRelidNumIndexId: attrelid, attnum\n\t*/\n\tif (HeapTupleIsValid(newtup))\n\t{\n\t\tDatum\t\td;\n\t\tbool\t\tisnull;\n\t\n\t\tnewhash = 0;\n\t\n\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_attribute_attrelid,  &isnull);\n\t\tnewhash = caql_pkhash(pCtx, newhash, d, isnull, OIDOID);\n\t\t\n\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_attribute_attname,  &isnull);\n\t\tnewhash = caql
 _pkhash(pCtx, newhash, d, isnull, NAMEOID);\n\t\n\t\tcaql_lockwell(pCtx, AttributeRelationId, \n\t\t\t\t\t  pklockmode, newtup,\n\t\t\t\t\t  \"pg_attribute\",\n\t\t\t\t\t  \"attrelid, attname\",\n\t\t\t\t\t  AttributeRelidNameIndexId,\n\t\t\t\t\t  newhash,\n\t\t\t\t\t  dontWait,\n\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t);\n\t}\n\tif (HeapTupleIsValid(oldtup))\n\t{\n\t\tDatum\t\td;\n\t\tbool\t\tisnull;\n\t\n\t\toldhash = 0;\n\t\n\t\td = caql_getattr_internal(pCtx, oldtup, Anum_pg_attribute_attrelid,  &isnull);\n\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, OIDOID);\n\t\t\n\t\td = caql_getattr_internal(pCtx, oldtup, Anum_pg_attribute_attname,  &isnull);\n\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, NAMEOID);\n\t\n\t\tcaql_lockwell(pCtx, AttributeRelationId, \n\t\t\t\t\t  pklockmode, oldtup,\n\t\t\t\t\t  \"pg_attribute\",\n\t\t\t\t\t  \"attrelid, attname\",\n\t\t\t\t\t  AttributeRelidNameIndexId,\n\t\t\t\t\t  oldhash,\n\t\t\t\t\t  dontWait,\n\t\t\t\t\t  f
 alse /* don't ignore invalid tuple */\n\t\t\t);\n\t}\n\tif (HeapTupleIsValid(newtup))\n\t{\n\t\tDatum\t\td;\n\t\tbool\t\tisnull;\n\t\n\t\tnewhash = 0;\n\t\n\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_attribute_attrelid,  &isnull);\n\t\tnewhash = caql_pkhash(pCtx, newhash, d, isnull, OIDOID);\n\t\t\n\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_attribute_attnum,  &isnull);\n\t\tnewhash = caql_pkhash(pCtx, newhash, d, isnull, INT2OID);\n\t\n\t\tcaql_lockwell(pCtx, AttributeRelationId, \n\t\t\t\t\t  pklockmode, newtup,\n\t\t\t\t\t  \"pg_attribute\",\n\t\t\t\t\t  \"attrelid, attnum\",\n\t\t\t\t\t  AttributeRelidNumIndexId,\n\t\t\t\t\t  newhash,\n\t\t\t\t\t  dontWait,\n\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t);\n\t}\n\tif (HeapTupleIsValid(oldtup))\n\t{\n\t\tDatum\t\td;\n\t\tbool\t\tisnull;\n\t\n\t\toldhash = 0;\n\t\n\t\td = caql_getattr_internal(pCtx, oldtup, Anum_pg_attribute_attrelid,  &isnull);\n\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, OIDOI
 D);\n\t\t\n\t\td = caql_getattr_internal(pCtx, oldtup, Anum_pg_attribute_attnum,  &isnull);\n\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, INT2OID);\n\t\n\t\tcaql_lockwell(pCtx, AttributeRelationId, \n\t\t\t\t\t  pklockmode, oldtup,\n\t\t\t\t\t  \"pg_attribute\",\n\t\t\t\t\t  \"attrelid, attnum\",\n\t\t\t\t\t  AttributeRelidNumIndexId,\n\t\t\t\t\t  oldhash,\n\t\t\t\t\t  dontWait,\n\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t);\n\t}\n\n\n\t/* NOTE: don't get fk locks if only needed share locks on pk */\n\tif (pklockmode != AccessExclusiveLock)\n\t\treturn;\n\n\tif (!is_iud)\n\t{\n\t\t/* \n\t\t  if deleting, pg_attribute primary key may be referenced in:\n\t\t  pg_attrdef (adrelid) <- (attrelid)\n\t\t  pg_attribute_encoding (attrelid) <- (attrelid)\n\t\t  pg_rewrite (ev_class) <- (attrelid)\n\t\t  pg_statistic (starelid) <- (attrelid) \n\t\t*/\n\n\t}\n\telse\n\t{\n\t\tdontWait = true; /* never wait for share locks on foreign keys */\n\t\t/* \n\t\t  if insert/update
 , check foreign keys against:\t\n\t\t  pg_class (oid) <- (attrelid)\n\t\t  pg_type (oid) <- (atttypid) \n\t\t*/\n\n\t\tif (HeapTupleIsValid(newtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\tnewhash = 0;\n\t\t\n\t\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_attribute_attrelid,  &isnull);\n\t\t\tnewhash = caql_pkhash(pCtx, newhash, d, isnull, OIDOID);\n\t\t\n\t\t\tcaql_lockwell(pCtx, RelationRelationId, \n\t\t\t\t\t\t  AccessShareLock, newtup,\n\t\t\t\t\t\t  \"pg_class\",\n\t\t\t\t\t\t  \"oid\",\n\t\t\t\t\t\t  ClassOidIndexId,\n\t\t\t\t\t\t  newhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\t\tif (HeapTupleIsValid(oldtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\toldhash = 0;\n\t\t\n\t\t\td = caql_getattr_internal(pCtx, oldtup, Anum_pg_attribute_attrelid,  &isnull);\n\t\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, OIDOID);\n\t\t\n\t\t\tcaql_lockwell(pCtx, RelationRelationI
 d, \n\t\t\t\t\t\t  AccessShareLock, oldtup,\n\t\t\t\t\t\t  \"pg_class\",\n\t\t\t\t\t\t  \"oid\",\n\t\t\t\t\t\t  ClassOidIndexId,\n\t\t\t\t\t\t  oldhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\t\tif (HeapTupleIsValid(newtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\tnewhash = 0;\n\t\t\n\t\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_attribute_atttypid,  &isnull);\n\t\t\tnewhash = caql_pkhash(pCtx, newhash, d, isnull, OIDOID);\n\t\t\n\t\t\tcaql_lockwell(pCtx, TypeRelationId, \n\t\t\t\t\t\t  AccessShareLock, newtup,\n\t\t\t\t\t\t  \"pg_type\",\n\t\t\t\t\t\t  \"oid\",\n\t\t\t\t\t\t  TypeOidIndexId,\n\t\t\t\t\t\t  newhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\t\tif (HeapTupleIsValid(oldtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\toldhash = 0;\n\t\t\n\t\t\td = caql_getattr_internal(pCtx, oldtup, Anum_pg_attribute_attt
 ypid,  &isnull);\n\t\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, OIDOID);\n\t\t\n\t\t\tcaql_lockwell(pCtx, TypeRelationId, \n\t\t\t\t\t\t  AccessShareLock, oldtup,\n\t\t\t\t\t\t  \"pg_type\",\n\t\t\t\t\t\t  \"oid\",\n\t\t\t\t\t\t  TypeOidIndexId,\n\t\t\t\t\t\t  oldhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\n\t}\n} /* end caql_iud_fn_8 */\n",
+      "iud_func_name" : "caql_iud_fn_8",
+      "num_del_ops" : 0,
+      "num_ins_ops" : 3,
+      "num_upd_ops" : 0,
+      "tablename" : "pg_attribute"
+   },
+   "insert into pg_attribute_encoding" : {
+      "cql" : "cql",
+      "files" : {
+         "../../../..//src/backend/catalog/pg_attribute_encoding.c" : 1
+      },
+      "foreign_key_tables" : {
+         "pg_attribute" : {
+            "(attrelid) <- (attrelid)" : 1
+         }
+      },
+      "func" : "static\nSysScanDesc\ncaql_basic_fn_9(cqContext *pCtx, cq_list *pcql, bool bLockEntireTable)\n{\n\tRelation\trel;\n\n\tpCtx->cq_relationId = AttributeEncodingRelationId;\n\n\tif (!pCtx->cq_externrel)\n\t{\n\t\t\n\t\t{\n\t\t\tpCtx->cq_heap_rel = heap_open(pCtx->cq_relationId, \n\t\t\t\t\t\t\t\t\t\t  pCtx->cq_lockmode);\n\t\t\tpCtx->cq_tupdesc  = RelationGetDescr(pCtx->cq_heap_rel);\n\t\t}\n\t}\n\telse\n\t{\n\t\t/* make sure the supplied relation matches the caql */\n\t\tif (RelationIsValid(pCtx->cq_heap_rel))\n\t\t{\n\t\t\tAssert(AttributeEncodingRelationId == \n\t\t\t\t   RelationGetRelid(pCtx->cq_heap_rel));\n\t\t\tpCtx->cq_tupdesc  = RelationGetDescr(pCtx->cq_heap_rel);\n\t\t}\n\n\t}\t\t\n\n\trel = pCtx->cq_heap_rel;\n\n\treturn NULL; /* XXX XXX: don't init scan */\n}\n",
+      "func_name" : "caql_basic_fn_9",
+      "func_note" : "",
+      "func_number" : "9",
+      "indexes" : {},
+      "iud_func" : "\nstatic\nvoid caql_iud_fn_9(cqContext *pCtx, int is_iud, \n\t\t\t\t\t HeapTuple oldtup, HeapTuple newtup, bool dontWait,\n\t\t\t\t\t LOCKMODE pklockmode)\n{\n\tOid oldhash = 0;\n\tOid newhash = 0;\n\n\tif (HeapTupleIsValid(oldtup))\n\t{\n\t\tif (!pCtx->cq_setpklock)\n\t\t\tAssert(RelationIsValid(pCtx->cq_heap_rel));\n\t\n\t\toldhash = 0;\n\t}\n\tif (HeapTupleIsValid(newtup))\n\t{\n\t\tif (!pCtx->cq_setpklock)\n\t\t\tAssert(RelationIsValid(pCtx->cq_heap_rel));\n\t\n\t\tnewhash = 0;\n\t}\n\n\t/*\n\t1 unique index:\n\tAttributeEncodingAttrelidAttnumIndexId: attrelid, attnum\n\t*/\n\tif (HeapTupleIsValid(newtup))\n\t{\n\t\tDatum\t\td;\n\t\tbool\t\tisnull;\n\t\n\t\tnewhash = 0;\n\t\n\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_attribute_encoding_attrelid,  &isnull);\n\t\tnewhash = caql_pkhash(pCtx, newhash, d, isnull, OIDOID);\n\t\t\n\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_attribute_encoding_attnum,  &isnull);\n\t\tnewhash = caql_pkhash(pCtx, newha
 sh, d, isnull, INT2OID);\n\t\n\t\tcaql_lockwell(pCtx, AttributeEncodingRelationId, \n\t\t\t\t\t  pklockmode, newtup,\n\t\t\t\t\t  \"pg_attribute_encoding\",\n\t\t\t\t\t  \"attrelid, attnum\",\n\t\t\t\t\t  AttributeEncodingAttrelidAttnumIndexId,\n\t\t\t\t\t  newhash,\n\t\t\t\t\t  dontWait,\n\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t);\n\t}\n\tif (HeapTupleIsValid(oldtup))\n\t{\n\t\tDatum\t\td;\n\t\tbool\t\tisnull;\n\t\n\t\toldhash = 0;\n\t\n\t\td = caql_getattr_internal(pCtx, oldtup, Anum_pg_attribute_encoding_attrelid,  &isnull);\n\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, OIDOID);\n\t\t\n\t\td = caql_getattr_internal(pCtx, oldtup, Anum_pg_attribute_encoding_attnum,  &isnull);\n\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, INT2OID);\n\t\n\t\tcaql_lockwell(pCtx, AttributeEncodingRelationId, \n\t\t\t\t\t  pklockmode, oldtup,\n\t\t\t\t\t  \"pg_attribute_encoding\",\n\t\t\t\t\t  \"attrelid, attnum\",\n\t\t\t\t\t  AttributeEncodingAttrelidAttnumIndexId,\n\t
 \t\t\t\t  oldhash,\n\t\t\t\t\t  dontWait,\n\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t);\n\t}\n\n\n\t/* NOTE: don't get fk locks if only needed share locks on pk */\n\tif (pklockmode != AccessExclusiveLock)\n\t\treturn;\n\n\tif (!is_iud)\n\t{\n\t\t\n\t}\n\telse\n\t{\n\t\tdontWait = true; /* never wait for share locks on foreign keys */\n\t\t/* \n\t\t  if insert/update, check foreign keys against:\t\n\t\t  pg_attribute (attrelid) <- (attrelid) \n\t\t*/\n\n\t\tif (HeapTupleIsValid(newtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\tnewhash = 0;\n\t\t\n\t\t\t{ d = 0; isnull = 0; }\n\t\t\tcaql_lockwell(pCtx, AttributeRelationId, \n\t\t\t\t\t\t  AccessShareLock, newtup,\n\t\t\t\t\t\t  \"pg_attribute\",\n\t\t\t\t\t\t  \"attrelid\",\n\t\t\t\t\t\t  InvalidOid,\n\t\t\t\t\t\t  newhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\t\tif (HeapTupleIsValid(oldtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tis
 null;\n\t\t\n\t\t\toldhash = 0;\n\t\t\n\t\t\t{ d = 0; isnull = 0; }\n\t\t\tcaql_lockwell(pCtx, AttributeRelationId, \n\t\t\t\t\t\t  AccessShareLock, oldtup,\n\t\t\t\t\t\t  \"pg_attribute\",\n\t\t\t\t\t\t  \"attrelid\",\n\t\t\t\t\t\t  InvalidOid,\n\t\t\t\t\t\t  oldhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\n\t}\n} /* end caql_iud_fn_9 */\n",
+      "iud_func_name" : "caql_iud_fn_9",
+      "num_del_ops" : 0,
+      "num_ins_ops" : 1,
+      "num_upd_ops" : 0,
+      "tablename" : "pg_attribute_encoding"
+   },
+   "insert into pg_auth_members" : {
+      "cql" : "cql",
+      "files" : {
+         "../../../..//src/backend/commands/user.c" : 1
+      },
+      "foreign_key_tables" : {
+         "pg_authid" : {
+            "(oid) <- (member)" : 1,
+            "(oid) <- (roleid)" : 1
+         }
+      },
+      "func" : "static\nSysScanDesc\ncaql_basic_fn_10(cqContext *pCtx, cq_list *pcql, bool bLockEntireTable)\n{\n\tRelation\trel;\n\n\tpCtx->cq_relationId = AuthMemRelationId;\n\n\tif (!pCtx->cq_externrel)\n\t{\n\t\t\n\t\t{\n\t\t\tpCtx->cq_heap_rel = heap_open(pCtx->cq_relationId, \n\t\t\t\t\t\t\t\t\t\t  pCtx->cq_lockmode);\n\t\t\tpCtx->cq_tupdesc  = RelationGetDescr(pCtx->cq_heap_rel);\n\t\t}\n\t}\n\telse\n\t{\n\t\t/* make sure the supplied relation matches the caql */\n\t\tif (RelationIsValid(pCtx->cq_heap_rel))\n\t\t{\n\t\t\tAssert(AuthMemRelationId == \n\t\t\t\t   RelationGetRelid(pCtx->cq_heap_rel));\n\t\t\tpCtx->cq_tupdesc  = RelationGetDescr(pCtx->cq_heap_rel);\n\t\t}\n\n\t}\t\t\n\n\trel = pCtx->cq_heap_rel;\n\n\treturn NULL; /* XXX XXX: don't init scan */\n}\n",
+      "func_name" : "caql_basic_fn_10",
+      "func_note" : "",
+      "func_number" : "10",
+      "indexes" : {},
+      "iud_func" : "\nstatic\nvoid caql_iud_fn_10(cqContext *pCtx, int is_iud, \n\t\t\t\t\t HeapTuple oldtup, HeapTuple newtup, bool dontWait,\n\t\t\t\t\t LOCKMODE pklockmode)\n{\n\tOid oldhash = 0;\n\tOid newhash = 0;\n\n\tif (HeapTupleIsValid(oldtup))\n\t{\n\t\tif (!pCtx->cq_setpklock)\n\t\t\tAssert(RelationIsValid(pCtx->cq_heap_rel));\n\t\n\t\toldhash = 0;\n\t}\n\tif (HeapTupleIsValid(newtup))\n\t{\n\t\tif (!pCtx->cq_setpklock)\n\t\t\tAssert(RelationIsValid(pCtx->cq_heap_rel));\n\t\n\t\tnewhash = 0;\n\t}\n\n\t/*\n\t2 unique indexes:\n\tAuthMemRoleMemIndexId: roleid, member\n\tAuthMemMemRoleIndexId: member, roleid\n\t*/\n\tif (HeapTupleIsValid(newtup))\n\t{\n\t\tDatum\t\td;\n\t\tbool\t\tisnull;\n\t\n\t\tnewhash = 0;\n\t\n\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_auth_members_roleid,  &isnull);\n\t\tnewhash = caql_pkhash(pCtx, newhash, d, isnull, OIDOID);\n\t\t\n\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_auth_members_member,  &isnull);\n\t\tnewhash = caql_pkhash(
 pCtx, newhash, d, isnull, OIDOID);\n\t\n\t\tcaql_lockwell(pCtx, AuthMemRelationId, \n\t\t\t\t\t  pklockmode, newtup,\n\t\t\t\t\t  \"pg_auth_members\",\n\t\t\t\t\t  \"roleid, member\",\n\t\t\t\t\t  AuthMemRoleMemIndexId,\n\t\t\t\t\t  newhash,\n\t\t\t\t\t  dontWait,\n\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t);\n\t}\n\tif (HeapTupleIsValid(oldtup))\n\t{\n\t\tDatum\t\td;\n\t\tbool\t\tisnull;\n\t\n\t\toldhash = 0;\n\t\n\t\td = caql_getattr_internal(pCtx, oldtup, Anum_pg_auth_members_roleid,  &isnull);\n\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, OIDOID);\n\t\t\n\t\td = caql_getattr_internal(pCtx, oldtup, Anum_pg_auth_members_member,  &isnull);\n\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, OIDOID);\n\t\n\t\tcaql_lockwell(pCtx, AuthMemRelationId, \n\t\t\t\t\t  pklockmode, oldtup,\n\t\t\t\t\t  \"pg_auth_members\",\n\t\t\t\t\t  \"roleid, member\",\n\t\t\t\t\t  AuthMemRoleMemIndexId,\n\t\t\t\t\t  oldhash,\n\t\t\t\t\t  dontWait,\n\t\t\t\t\t  false /* don't ignor
 e invalid tuple */\n\t\t\t);\n\t}\n\tif (HeapTupleIsValid(newtup))\n\t{\n\t\tDatum\t\td;\n\t\tbool\t\tisnull;\n\t\n\t\tnewhash = 0;\n\t\n\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_auth_members_member,  &isnull);\n\t\tnewhash = caql_pkhash(pCtx, newhash, d, isnull, OIDOID);\n\t\t\n\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_auth_members_roleid,  &isnull);\n\t\tnewhash = caql_pkhash(pCtx, newhash, d, isnull, OIDOID);\n\t\n\t\tcaql_lockwell(pCtx, AuthMemRelationId, \n\t\t\t\t\t  pklockmode, newtup,\n\t\t\t\t\t  \"pg_auth_members\",\n\t\t\t\t\t  \"member, roleid\",\n\t\t\t\t\t  AuthMemMemRoleIndexId,\n\t\t\t\t\t  newhash,\n\t\t\t\t\t  dontWait,\n\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t);\n\t}\n\tif (HeapTupleIsValid(oldtup))\n\t{\n\t\tDatum\t\td;\n\t\tbool\t\tisnull;\n\t\n\t\toldhash = 0;\n\t\n\t\td = caql_getattr_internal(pCtx, oldtup, Anum_pg_auth_members_member,  &isnull);\n\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, OIDOID);\n\t\t\n\t\td = 
 caql_getattr_internal(pCtx, oldtup, Anum_pg_auth_members_roleid,  &isnull);\n\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, OIDOID);\n\t\n\t\tcaql_lockwell(pCtx, AuthMemRelationId, \n\t\t\t\t\t  pklockmode, oldtup,\n\t\t\t\t\t  \"pg_auth_members\",\n\t\t\t\t\t  \"member, roleid\",\n\t\t\t\t\t  AuthMemMemRoleIndexId,\n\t\t\t\t\t  oldhash,\n\t\t\t\t\t  dontWait,\n\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t);\n\t}\n\n\n\t/* NOTE: don't get fk locks if only needed share locks on pk */\n\tif (pklockmode != AccessExclusiveLock)\n\t\treturn;\n\n\tif (!is_iud)\n\t{\n\t\t\n\t}\n\telse\n\t{\n\t\tdontWait = true; /* never wait for share locks on foreign keys */\n\t\t/* \n\t\t  if insert/update, check foreign keys against:\t\n\t\t  pg_authid (oid) <- (member)\n\t\t  pg_authid (oid) <- (roleid) \n\t\t*/\n\n\t\tif (HeapTupleIsValid(newtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\tnewhash = 0;\n\t\t\n\t\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_au
 th_members_member,  &isnull);\n\t\t\tnewhash = caql_pkhash(pCtx, newhash, d, isnull, OIDOID);\n\t\t\n\t\t\tcaql_lockwell(pCtx, AuthIdRelationId, \n\t\t\t\t\t\t  AccessShareLock, newtup,\n\t\t\t\t\t\t  \"pg_authid\",\n\t\t\t\t\t\t  \"oid\",\n\t\t\t\t\t\t  AuthIdOidIndexId,\n\t\t\t\t\t\t  newhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\t\tif (HeapTupleIsValid(oldtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\toldhash = 0;\n\t\t\n\t\t\td = caql_getattr_internal(pCtx, oldtup, Anum_pg_auth_members_member,  &isnull);\n\t\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, OIDOID);\n\t\t\n\t\t\tcaql_lockwell(pCtx, AuthIdRelationId, \n\t\t\t\t\t\t  AccessShareLock, oldtup,\n\t\t\t\t\t\t  \"pg_authid\",\n\t\t\t\t\t\t  \"oid\",\n\t\t\t\t\t\t  AuthIdOidIndexId,\n\t\t\t\t\t\t  oldhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\t\tif (HeapTupleIsValid(newtup))
 \n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\tnewhash = 0;\n\t\t\n\t\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_auth_members_roleid,  &isnull);\n\t\t\tnewhash = caql_pkhash(pCtx, newhash, d, isnull, OIDOID);\n\t\t\n\t\t\tcaql_lockwell(pCtx, AuthIdRelationId, \n\t\t\t\t\t\t  AccessShareLock, newtup,\n\t\t\t\t\t\t  \"pg_authid\",\n\t\t\t\t\t\t  \"oid\",\n\t\t\t\t\t\t  AuthIdOidIndexId,\n\t\t\t\t\t\t  newhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\t\tif (HeapTupleIsValid(oldtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\toldhash = 0;\n\t\t\n\t\t\td = caql_getattr_internal(pCtx, oldtup, Anum_pg_auth_members_roleid,  &isnull);\n\t\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, OIDOID);\n\t\t\n\t\t\tcaql_lockwell(pCtx, AuthIdRelationId, \n\t\t\t\t\t\t  AccessShareLock, oldtup,\n\t\t\t\t\t\t  \"pg_authid\",\n\t\t\t\t\t\t  \"oid\",\n\t\t\t\t\t\t  AuthIdOidIndexId,\n\t\t\t\t\t\t  ol
 dhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\n\t}\n} /* end caql_iud_fn_10 */\n",
+      "iud_func_name" : "caql_iud_fn_10",
+      "num_del_ops" : 0,
+      "num_ins_ops" : 1,
+      "num_upd_ops" : 0,
+      "tablename" : "pg_auth_members"
+   },
+   "insert into pg_auth_time_constraint" : {
+      "cql" : "cql",
+      "files" : {
+         "../../../..//src/backend/commands/user.c" : 1
+      },
+      "foreign_key_tables" : {
+         "pg_authid" : {
+            "(oid) <- (authid)" : 1
+         }
+      },
+      "func" : "static\nSysScanDesc\ncaql_basic_fn_11(cqContext *pCtx, cq_list *pcql, bool bLockEntireTable)\n{\n\tRelation\trel;\n\n\tpCtx->cq_relationId = AuthTimeConstraintRelationId;\n\n\tif (!pCtx->cq_externrel)\n\t{\n\t\t\n\t\t{\n\t\t\tpCtx->cq_heap_rel = heap_open(pCtx->cq_relationId, \n\t\t\t\t\t\t\t\t\t\t  pCtx->cq_lockmode);\n\t\t\tpCtx->cq_tupdesc  = RelationGetDescr(pCtx->cq_heap_rel);\n\t\t}\n\t}\n\telse\n\t{\n\t\t/* make sure the supplied relation matches the caql */\n\t\tif (RelationIsValid(pCtx->cq_heap_rel))\n\t\t{\n\t\t\tAssert(AuthTimeConstraintRelationId == \n\t\t\t\t   RelationGetRelid(pCtx->cq_heap_rel));\n\t\t\tpCtx->cq_tupdesc  = RelationGetDescr(pCtx->cq_heap_rel);\n\t\t}\n\n\t}\t\t\n\n\trel = pCtx->cq_heap_rel;\n\n\treturn NULL; /* XXX XXX: don't init scan */\n}\n",
+      "func_name" : "caql_basic_fn_11",
+      "func_note" : "",
+      "func_number" : "11",
+      "indexes" : {},
+      "iud_func" : "\nstatic\nvoid caql_iud_fn_11(cqContext *pCtx, int is_iud, \n\t\t\t\t\t HeapTuple oldtup, HeapTuple newtup, bool dontWait,\n\t\t\t\t\t LOCKMODE pklockmode)\n{\n\tOid oldhash = 0;\n\tOid newhash = 0;\n\n\tif (HeapTupleIsValid(oldtup))\n\t{\n\t\tif (!pCtx->cq_setpklock)\n\t\t\tAssert(RelationIsValid(pCtx->cq_heap_rel));\n\t\n\t\toldhash = 0;\n\t}\n\tif (HeapTupleIsValid(newtup))\n\t{\n\t\tif (!pCtx->cq_setpklock)\n\t\t\tAssert(RelationIsValid(pCtx->cq_heap_rel));\n\t\n\t\tnewhash = 0;\n\t}\n\n\t/* ZERO indexes */\n\t/* Cannot obtain exclusive lock on tuple !! */\n\n\t/* NOTE: don't get fk locks if only needed share locks on pk */\n\tif (pklockmode != AccessExclusiveLock)\n\t\treturn;\n\n\tif (!is_iud)\n\t{\n\t\t\n\t}\n\telse\n\t{\n\t\tdontWait = true; /* never wait for share locks on foreign keys */\n\t\t/* \n\t\t  if insert/update, check foreign keys against:\t\n\t\t  pg_authid (oid) <- (authid) \n\t\t*/\n\n\t\tif (HeapTupleIsValid(newtup))\n\t\t{\n\t\t\tDatum\t\t
 d;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\tnewhash = 0;\n\t\t\n\t\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_auth_time_constraint_authid,  &isnull);\n\t\t\tnewhash = caql_pkhash(pCtx, newhash, d, isnull, OIDOID);\n\t\t\n\t\t\tcaql_lockwell(pCtx, AuthIdRelationId, \n\t\t\t\t\t\t  AccessShareLock, newtup,\n\t\t\t\t\t\t  \"pg_authid\",\n\t\t\t\t\t\t  \"oid\",\n\t\t\t\t\t\t  AuthIdOidIndexId,\n\t\t\t\t\t\t  newhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\t\tif (HeapTupleIsValid(oldtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\toldhash = 0;\n\t\t\n\t\t\td = caql_getattr_internal(pCtx, oldtup, Anum_pg_auth_time_constraint_authid,  &isnull);\n\t\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, OIDOID);\n\t\t\n\t\t\tcaql_lockwell(pCtx, AuthIdRelationId, \n\t\t\t\t\t\t  AccessShareLock, oldtup,\n\t\t\t\t\t\t  \"pg_authid\",\n\t\t\t\t\t\t  \"oid\",\n\t\t\t\t\t\t  AuthIdOidIndexId,\n\t\t\t\t\t\t  oldhash,\n
 \t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\n\t}\n} /* end caql_iud_fn_11 */\n",
+      "iud_func_name" : "caql_iud_fn_11",
+      "num_del_ops" : 0,
+      "num_ins_ops" : 1,
+      "num_upd_ops" : 0,
+      "tablename" : "pg_auth_time_constraint"
+   },
+   "insert into pg_authid" : {
+      "cql" : "cql",
+      "files" : {
+         "../../../..//src/backend/commands/user.c" : 1
+      },
+      "foreign_key_tables" : {
+         "pg_resqueue" : {
+            "(oid) <- (rolresqueue)" : 1
+         }
+      },
+      "func" : "static\nSysScanDesc\ncaql_basic_fn_12(cqContext *pCtx, cq_list *pcql, bool bLockEntireTable)\n{\n\tRelation\trel;\n\n\tpCtx->cq_relationId = AuthIdRelationId;\n\n\tif (!pCtx->cq_externrel)\n\t{\n\t\t\n\t\t{\n\t\t\tpCtx->cq_heap_rel = heap_open(pCtx->cq_relationId, \n\t\t\t\t\t\t\t\t\t\t  pCtx->cq_lockmode);\n\t\t\tpCtx->cq_tupdesc  = RelationGetDescr(pCtx->cq_heap_rel);\n\t\t}\n\t}\n\telse\n\t{\n\t\t/* make sure the supplied relation matches the caql */\n\t\tif (RelationIsValid(pCtx->cq_heap_rel))\n\t\t{\n\t\t\tAssert(AuthIdRelationId == \n\t\t\t\t   RelationGetRelid(pCtx->cq_heap_rel));\n\t\t\tpCtx->cq_tupdesc  = RelationGetDescr(pCtx->cq_heap_rel);\n\t\t}\n\n\t}\t\t\n\n\trel = pCtx->cq_heap_rel;\n\n\treturn NULL; /* XXX XXX: don't init scan */\n}\n",
+      "func_name" : "caql_basic_fn_12",
+      "func_note" : "",
+      "func_number" : "12",
+      "indexes" : {},
+      "iud_func" : "\nstatic\nvoid caql_iud_fn_12(cqContext *pCtx, int is_iud, \n\t\t\t\t\t HeapTuple oldtup, HeapTuple newtup, bool dontWait,\n\t\t\t\t\t LOCKMODE pklockmode)\n{\n\tOid oldhash = 0;\n\tOid newhash = 0;\n\n\tif (HeapTupleIsValid(oldtup))\n\t{\n\t\tif (!pCtx->cq_setpklock)\n\t\t\tAssert(RelationIsValid(pCtx->cq_heap_rel));\n\t\n\t\toldhash = 0;\n\t}\n\tif (HeapTupleIsValid(newtup))\n\t{\n\t\tif (!pCtx->cq_setpklock)\n\t\t\tAssert(RelationIsValid(pCtx->cq_heap_rel));\n\t\n\t\tnewhash = 0;\n\t}\n\n\t/*\n\t2 unique indexes:\n\tAuthIdRolnameIndexId: rolname\n\tAuthIdOidIndexId: oid\n\t*/\n\t/* pg_authid: do not get exclusive lock */\n\n\t/* NOTE: don't get fk locks if only needed share locks on pk */\n\tif (pklockmode != AccessExclusiveLock)\n\t\treturn;\n\n\tif (!is_iud)\n\t{\n\t\t/* \n\t\t  if deleting, pg_authid primary key may be referenced in:\n\t\t  pg_auth_members (member) <- (oid)\n\t\t  pg_auth_members (roleid) <- (oid)\n\t\t  pg_auth_time_constraint (authid) <- 
 (oid)\n\t\t  pg_class (relowner) <- (oid)\n\t\t  pg_compression (compowner) <- (oid)\n\t\t  pg_conversion (conowner) <- (oid)\n\t\t  pg_database (datdba) <- (oid)\n\t\t  pg_foreign_data_wrapper (fdwowner) <- (oid)\n\t\t  pg_foreign_server (srvowner) <- (oid)\n\t\t  pg_namespace (nspowner) <- (oid)\n\t\t  pg_opclass (opcowner) <- (oid)\n\t\t  pg_operator (oprowner) <- (oid)\n\t\t  pg_proc (proowner) <- (oid)\n\t\t  pg_remote_credentials (rcowner) <- (oid)\n\t\t  pg_tablespace (spcowner) <- (oid)\n\t\t  pg_type (typowner) <- (oid)\n\t\t  pg_user_mapping (umuser) <- (oid) \n\t\t*/\n\n\t}\n\telse\n\t{\n\t\tdontWait = true; /* never wait for share locks on foreign keys */\n\t\t/* \n\t\t  if insert/update, check foreign keys against:\t\n\t\t  pg_resqueue (oid) <- (rolresqueue) \n\t\t*/\n\n\t\t/* No Share Locks Acquired */\n\t}\n} /* end caql_iud_fn_12 */\n",
+      "iud_func_name" : "caql_iud_fn_12",
+      "num_del_ops" : 0,
+      "num_ins_ops" : 1,
+      "num_upd_ops" : 0,
+      "tablename" : "pg_authid"
+   },
+   "insert into pg_cast" : {
+      "cql" : "cql",
+      "files" : {
+         "../../../..//src/backend/commands/functioncmds.c" : 1
+      },
+      "foreign_key_tables" : {
+         "pg_proc" : {
+            "(oid) <- (castfunc)" : 1
+         },
+         "pg_type" : {
+            "(oid) <- (castsource)" : 1,
+            "(oid) <- (casttarget)" : 1
+         }
+      },
+      "func" : "static\nSysScanDesc\ncaql_basic_fn_13(cqContext *pCtx, cq_list *pcql, bool bLockEntireTable)\n{\n\tRelation\trel;\n\n\tpCtx->cq_relationId = CastRelationId;\n\n\tif (!pCtx->cq_externrel)\n\t{\n\t\t\n\t\t{\n\t\t\tpCtx->cq_heap_rel = heap_open(pCtx->cq_relationId, \n\t\t\t\t\t\t\t\t\t\t  pCtx->cq_lockmode);\n\t\t\tpCtx->cq_tupdesc  = RelationGetDescr(pCtx->cq_heap_rel);\n\t\t}\n\t}\n\telse\n\t{\n\t\t/* make sure the supplied relation matches the caql */\n\t\tif (RelationIsValid(pCtx->cq_heap_rel))\n\t\t{\n\t\t\tAssert(CastRelationId == \n\t\t\t\t   RelationGetRelid(pCtx->cq_heap_rel));\n\t\t\tpCtx->cq_tupdesc  = RelationGetDescr(pCtx->cq_heap_rel);\n\t\t}\n\n\t}\t\t\n\n\trel = pCtx->cq_heap_rel;\n\n\treturn NULL; /* XXX XXX: don't init scan */\n}\n",
+      "func_name" : "caql_basic_fn_13",
+      "func_note" : "",
+      "func_number" : "13",
+      "indexes" : {},
+      "iud_func" : "\nstatic\nvoid caql_iud_fn_13(cqContext *pCtx, int is_iud, \n\t\t\t\t\t HeapTuple oldtup, HeapTuple newtup, bool dontWait,\n\t\t\t\t\t LOCKMODE pklockmode)\n{\n\tOid oldhash = 0;\n\tOid newhash = 0;\n\n\tif (HeapTupleIsValid(oldtup))\n\t{\n\t\tif (!pCtx->cq_setpklock)\n\t\t\tAssert(RelationIsValid(pCtx->cq_heap_rel));\n\t\n\t\toldhash = 0;\n\t}\n\tif (HeapTupleIsValid(newtup))\n\t{\n\t\tif (!pCtx->cq_setpklock)\n\t\t\tAssert(RelationIsValid(pCtx->cq_heap_rel));\n\t\n\t\tnewhash = 0;\n\t}\n\n\t/*\n\t2 unique indexes:\n\tCastOidIndexId: oid\n\tCastSourceTargetIndexId: castsource, casttarget\n\t*/\n\tif (HeapTupleIsValid(newtup))\n\t{\n\t\tDatum\t\td;\n\t\tbool\t\tisnull;\n\t\n\t\tnewhash = 0;\n\t\n\t\td = caql_getattr_internal(pCtx, newtup, ObjectIdAttributeNumber,  &isnull);\n\t\tnewhash = caql_pkhash(pCtx, newhash, d, isnull, OIDOID);\n\t\n\t\tcaql_lockwell(pCtx, CastRelationId, \n\t\t\t\t\t  pklockmode, newtup,\n\t\t\t\t\t  \"pg_cast\",\n\t\t\t\t\t  \"oid\",\n\t
 \t\t\t\t  CastOidIndexId,\n\t\t\t\t\t  newhash,\n\t\t\t\t\t  dontWait,\n\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t);\n\t}\n\tif (HeapTupleIsValid(oldtup))\n\t{\n\t\tDatum\t\td;\n\t\tbool\t\tisnull;\n\t\n\t\toldhash = 0;\n\t\n\t\td = caql_getattr_internal(pCtx, oldtup, ObjectIdAttributeNumber,  &isnull);\n\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, OIDOID);\n\t\n\t\tcaql_lockwell(pCtx, CastRelationId, \n\t\t\t\t\t  pklockmode, oldtup,\n\t\t\t\t\t  \"pg_cast\",\n\t\t\t\t\t  \"oid\",\n\t\t\t\t\t  CastOidIndexId,\n\t\t\t\t\t  oldhash,\n\t\t\t\t\t  dontWait,\n\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t);\n\t}\n\tif (HeapTupleIsValid(newtup))\n\t{\n\t\tDatum\t\td;\n\t\tbool\t\tisnull;\n\t\n\t\tnewhash = 0;\n\t\n\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_cast_castsource,  &isnull);\n\t\tnewhash = caql_pkhash(pCtx, newhash, d, isnull, OIDOID);\n\t\t\n\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_cast_casttarget,  &isnull);\n\t\tnewhash =
  caql_pkhash(pCtx, newhash, d, isnull, OIDOID);\n\t\n\t\tcaql_lockwell(pCtx, CastRelationId, \n\t\t\t\t\t  pklockmode, newtup,\n\t\t\t\t\t  \"pg_cast\",\n\t\t\t\t\t  \"castsource, casttarget\",\n\t\t\t\t\t  CastSourceTargetIndexId,\n\t\t\t\t\t  newhash,\n\t\t\t\t\t  dontWait,\n\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t);\n\t}\n\tif (HeapTupleIsValid(oldtup))\n\t{\n\t\tDatum\t\td;\n\t\tbool\t\tisnull;\n\t\n\t\toldhash = 0;\n\t\n\t\td = caql_getattr_internal(pCtx, oldtup, Anum_pg_cast_castsource,  &isnull);\n\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, OIDOID);\n\t\t\n\t\td = caql_getattr_internal(pCtx, oldtup, Anum_pg_cast_casttarget,  &isnull);\n\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, OIDOID);\n\t\n\t\tcaql_lockwell(pCtx, CastRelationId, \n\t\t\t\t\t  pklockmode, oldtup,\n\t\t\t\t\t  \"pg_cast\",\n\t\t\t\t\t  \"castsource, casttarget\",\n\t\t\t\t\t  CastSourceTargetIndexId,\n\t\t\t\t\t  oldhash,\n\t\t\t\t\t  dontWait,\n\t\t\t\t\t  false /* don't ig
 nore invalid tuple */\n\t\t\t);\n\t}\n\n\n\t/* NOTE: don't get fk locks if only needed share locks on pk */\n\tif (pklockmode != AccessExclusiveLock)\n\t\treturn;\n\n\tif (!is_iud)\n\t{\n\t\t\n\t}\n\telse\n\t{\n\t\tdontWait = true; /* never wait for share locks on foreign keys */\n\t\t/* \n\t\t  if insert/update, check foreign keys against:\t\n\t\t  pg_proc (oid) <- (castfunc)\n\t\t  pg_type (oid) <- (castsource)\n\t\t  pg_type (oid) <- (casttarget) \n\t\t*/\n\n\t\tif (HeapTupleIsValid(newtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\tnewhash = 0;\n\t\t\n\t\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_cast_castfunc,  &isnull);\n\t\t\tnewhash = caql_pkhash(pCtx, newhash, d, isnull, OIDOID);\n\t\t\n\t\t\tcaql_lockwell(pCtx, ProcedureRelationId, \n\t\t\t\t\t\t  AccessShareLock, newtup,\n\t\t\t\t\t\t  \"pg_proc\",\n\t\t\t\t\t\t  \"oid\",\n\t\t\t\t\t\t  ProcedureOidIndexId,\n\t\t\t\t\t\t  newhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore in
 valid tuple */\n\t\t\t\t);\n\t\t}\n\t\tif (HeapTupleIsValid(oldtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\toldhash = 0;\n\t\t\n\t\t\td = caql_getattr_internal(pCtx, oldtup, Anum_pg_cast_castfunc,  &isnull);\n\t\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, OIDOID);\n\t\t\n\t\t\tcaql_lockwell(pCtx, ProcedureRelationId, \n\t\t\t\t\t\t  AccessShareLock, oldtup,\n\t\t\t\t\t\t  \"pg_proc\",\n\t\t\t\t\t\t  \"oid\",\n\t\t\t\t\t\t  ProcedureOidIndexId,\n\t\t\t\t\t\t  oldhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\t\tif (HeapTupleIsValid(newtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\tnewhash = 0;\n\t\t\n\t\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_cast_castsource,  &isnull);\n\t\t\tnewhash = caql_pkhash(pCtx, newhash, d, isnull, OIDOID);\n\t\t\n\t\t\tcaql_lockwell(pCtx, TypeRelationId, \n\t\t\t\t\t\t  AccessShareLock, newtup,\n\t\t\t\t\t\t  \"pg_type\",\n\t\t\t\t\t\t  \
 "oid\",\n\t\t\t\t\t\t  TypeOidIndexId,\n\t\t\t\t\t\t  newhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\t\tif (HeapTupleIsValid(oldtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\toldhash = 0;\n\t\t\n\t\t\td = caql_getattr_internal(pCtx, oldtup, Anum_pg_cast_castsource,  &isnull);\n\t\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, OIDOID);\n\t\t\n\t\t\tcaql_lockwell(pCtx, TypeRelationId, \n\t\t\t\t\t\t  AccessShareLock, oldtup,\n\t\t\t\t\t\t  \"pg_type\",\n\t\t\t\t\t\t  \"oid\",\n\t\t\t\t\t\t  TypeOidIndexId,\n\t\t\t\t\t\t  oldhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\t\tif (HeapTupleIsValid(newtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\tnewhash = 0;\n\t\t\n\t\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_cast_casttarget,  &isnull);\n\t\t\tnewhash = caql_pkhash(pCtx, newhash, d, isnull, OIDOID);\n\t\t\n\t\t\tca
 ql_lockwell(pCtx, TypeRelationId, \n\t\t\t\t\t\t  AccessShareLock, newtup,\n\t\t\t\t\t\t  \"pg_type\",\n\t\t\t\t\t\t  \"oid\",\n\t\t\t\t\t\t  TypeOidIndexId,\n\t\t\t\t\t\t  newhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\t\tif (HeapTupleIsValid(oldtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\toldhash = 0;\n\t\t\n\t\t\td = caql_getattr_internal(pCtx, oldtup, Anum_pg_cast_casttarget,  &isnull);\n\t\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, OIDOID);\n\t\t\n\t\t\tcaql_lockwell(pCtx, TypeRelationId, \n\t\t\t\t\t\t  AccessShareLock, oldtup,\n\t\t\t\t\t\t  \"pg_type\",\n\t\t\t\t\t\t  \"oid\",\n\t\t\t\t\t\t  TypeOidIndexId,\n\t\t\t\t\t\t  oldhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\n\t}\n} /* end caql_iud_fn_13 */\n",
+      "iud_func_name" : "caql_iud_fn_13",
+      "num_del_ops" : 0,
+      "num_ins_ops" : 1,
+      "num_upd_ops" : 0,
+      "tablename" : "pg_cast"
+   },
+   "insert into pg_class" : {
+      "cql" : "cql",
+      "files" : {
+         "../../../..//src/backend/catalog/heap.c" : 1
+      },
+      "foreign_key_tables" : {
+         "pg_am" : {
+            "(oid) <- (relam)" : 1
+         },
+         "pg_authid" : {
+            "(oid) <- (relowner)" : 1
+         },
+         "pg_class" : {
+            "(oid) <- (reltoastidxid)" : 1,
+            "(oid) <- (reltoastrelid)" : 1
+         },
+         "pg_namespace" : {
+            "(oid) <- (relnamespace)" : 1
+         },
+         "pg_tablespace" : {
+            "(oid) <- (reltablespace)" : 1
+         },
+         "pg_type" : {
+            "(oid) <- (reltype)" : 1
+         }
+      },
+      "func" : "static\nSysScanDesc\ncaql_basic_fn_14(cqContext *pCtx, cq_list *pcql, bool bLockEntireTable)\n{\n\tRelation\trel;\n\n\tpCtx->cq_relationId = RelationRelationId;\n\n\tif (!pCtx->cq_externrel)\n\t{\n\t\t\n\t\t{\n\t\t\tpCtx->cq_heap_rel = heap_open(pCtx->cq_relationId, \n\t\t\t\t\t\t\t\t\t\t  pCtx->cq_lockmode);\n\t\t\tpCtx->cq_tupdesc  = RelationGetDescr(pCtx->cq_heap_rel);\n\t\t}\n\t}\n\telse\n\t{\n\t\t/* make sure the supplied relation matches the caql */\n\t\tif (RelationIsValid(pCtx->cq_heap_rel))\n\t\t{\n\t\t\tAssert(RelationRelationId == \n\t\t\t\t   RelationGetRelid(pCtx->cq_heap_rel));\n\t\t\tpCtx->cq_tupdesc  = RelationGetDescr(pCtx->cq_heap_rel);\n\t\t}\n\n\t}\t\t\n\n\trel = pCtx->cq_heap_rel;\n\n\treturn NULL; /* XXX XXX: don't init scan */\n}\n",
+      "func_name" : "caql_basic_fn_14",
+      "func_note" : "",
+      "func_number" : "14",
+      "indexes" : {},
+      "iud_func" : "\nstatic\nvoid caql_iud_fn_14(cqContext *pCtx, int is_iud, \n\t\t\t\t\t HeapTuple oldtup, HeapTuple newtup, bool dontWait,\n\t\t\t\t\t LOCKMODE pklockmode)\n{\n\tOid oldhash = 0;\n\tOid newhash = 0;\n\n\tif (HeapTupleIsValid(oldtup))\n\t{\n\t\tif (!pCtx->cq_setpklock)\n\t\t\tAssert(RelationIsValid(pCtx->cq_heap_rel));\n\t\n\t\toldhash = 0;\n\t}\n\tif (HeapTupleIsValid(newtup))\n\t{\n\t\tif (!pCtx->cq_setpklock)\n\t\t\tAssert(RelationIsValid(pCtx->cq_heap_rel));\n\t\n\t\tnewhash = 0;\n\t}\n\n\t/*\n\t2 unique indexes:\n\tClassOidIndexId: oid\n\tClassNameNspIndexId: relname, relnamespace\n\t*/\n\tif (HeapTupleIsValid(newtup))\n\t{\n\t\tDatum\t\td;\n\t\tbool\t\tisnull;\n\t\n\t\tnewhash = 0;\n\t\n\t\td = caql_getattr_internal(pCtx, newtup, ObjectIdAttributeNumber,  &isnull);\n\t\tnewhash = caql_pkhash(pCtx, newhash, d, isnull, OIDOID);\n\t\n\t\tcaql_lockwell(pCtx, RelationRelationId, \n\t\t\t\t\t  pklockmode, newtup,\n\t\t\t\t\t  \"pg_class\",\n\t\t\t\t\t  \"oid\",\n\
 t\t\t\t\t  ClassOidIndexId,\n\t\t\t\t\t  newhash,\n\t\t\t\t\t  dontWait,\n\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t);\n\t}\n\tif (HeapTupleIsValid(oldtup))\n\t{\n\t\tDatum\t\td;\n\t\tbool\t\tisnull;\n\t\n\t\toldhash = 0;\n\t\n\t\td = caql_getattr_internal(pCtx, oldtup, ObjectIdAttributeNumber,  &isnull);\n\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, OIDOID);\n\t\n\t\tcaql_lockwell(pCtx, RelationRelationId, \n\t\t\t\t\t  pklockmode, oldtup,\n\t\t\t\t\t  \"pg_class\",\n\t\t\t\t\t  \"oid\",\n\t\t\t\t\t  ClassOidIndexId,\n\t\t\t\t\t  oldhash,\n\t\t\t\t\t  dontWait,\n\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t);\n\t}\n\tif (HeapTupleIsValid(newtup))\n\t{\n\t\tDatum\t\td;\n\t\tbool\t\tisnull;\n\t\n\t\tnewhash = 0;\n\t\n\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_class_relname,  &isnull);\n\t\tnewhash = caql_pkhash(pCtx, newhash, d, isnull, NAMEOID);\n\t\t\n\t\td = caql_getattr_internal(pCtx, newtup, Anum_pg_class_relnamespace,  &isnull);\n\t\
 tnewhash = caql_pkhash(pCtx, newhash, d, isnull, OIDOID);\n\t\n\t\tcaql_lockwell(pCtx, RelationRelationId, \n\t\t\t\t\t  pklockmode, newtup,\n\t\t\t\t\t  \"pg_class\",\n\t\t\t\t\t  \"relname, relnamespace\",\n\t\t\t\t\t  ClassNameNspIndexId,\n\t\t\t\t\t  newhash,\n\t\t\t\t\t  dontWait,\n\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t);\n\t}\n\tif (HeapTupleIsValid(oldtup))\n\t{\n\t\tDatum\t\td;\n\t\tbool\t\tisnull;\n\t\n\t\toldhash = 0;\n\t\n\t\td = caql_getattr_internal(pCtx, oldtup, Anum_pg_class_relname,  &isnull);\n\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, NAMEOID);\n\t\t\n\t\td = caql_getattr_internal(pCtx, oldtup, Anum_pg_class_relnamespace,  &isnull);\n\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, OIDOID);\n\t\n\t\tcaql_lockwell(pCtx, RelationRelationId, \n\t\t\t\t\t  pklockmode, oldtup,\n\t\t\t\t\t  \"pg_class\",\n\t\t\t\t\t  \"relname, relnamespace\",\n\t\t\t\t\t  ClassNameNspIndexId,\n\t\t\t\t\t  oldhash,\n\t\t\t\t\t  dontWait,\n\t\t\t\t\t  false
  /* don't ignore invalid tuple */\n\t\t\t);\n\t}\n\n\n\t/* NOTE: don't get fk locks if only needed share locks on pk */\n\tif (pklockmode != AccessExclusiveLock)\n\t\treturn;\n\n\tif (!is_iud)\n\t{\n\t\t/* \n\t\t  if deleting, pg_class primary key may be referenced in:\n\t\t  gp_distribution_policy (localoid) <- (oid)\n\t\t  gp_fastsequence (objid) <- (oid)\n\t\t  gp_relfile_node (relfilenode_oid) <- (oid)\n\t\t  pg_appendonly (relid) <- (oid)\n\t\t  pg_appendonly_alter_column (relid) <- (oid)\n\t\t  pg_attribute (attrelid) <- (oid)\n\t\t  pg_class (reltoastidxid) <- (oid)\n\t\t  pg_class (reltoastrelid) <- (oid)\n\t\t  pg_constraint (confrelid) <- (oid)\n\t\t  pg_constraint (conrelid) <- (oid)\n\t\t  pg_depend (classid) <- (oid)\n\t\t  pg_depend (refclassid) <- (oid)\n\t\t  pg_description (classoid) <- (oid)\n\t\t  pg_exttable (fmterrtbl) <- (oid)\n\t\t  pg_exttable (reloid) <- (oid)\n\t\t  pg_foreign_table (reloid) <- (oid)\n\t\t  pg_index (indexrelid) <- (oid)\n\t\t  pg_index (in
 drelid) <- (oid)\n\t\t  pg_inherits (inhparent) <- (oid)\n\t\t  pg_inherits (inhrelid) <- (oid)\n\t\t  pg_partition (parrelid) <- (oid)\n\t\t  pg_partition_rule (parchildrelid) <- (oid)\n\t\t  pg_shdepend (classid) <- (oid)\n\t\t  pg_shdepend (refclassid) <- (oid)\n\t\t  pg_shdescription (classoid) <- (oid)\n\t\t  pg_trigger (tgconstrrelid) <- (oid)\n\t\t  pg_trigger (tgrelid) <- (oid)\n\t\t  pg_type (typrelid) <- (oid) \n\t\t*/\n\n\t}\n\telse\n\t{\n\t\tdontWait = true; /* never wait for share locks on foreign keys */\n\t\t/* \n\t\t  if insert/update, check foreign keys against:\t\n\t\t  pg_am (oid) <- (relam)\n\t\t  pg_authid (oid) <- (relowner)\n\t\t  pg_class (oid) <- (reltoastidxid)\n\t\t  pg_class (oid) <- (reltoastrelid)\n\t\t  pg_namespace (oid) <- (relnamespace)\n\t\t  pg_tablespace (oid) <- (reltablespace)\n\t\t  pg_type (oid) <- (reltype) \n\t\t*/\n\n\t\tif (HeapTupleIsValid(newtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\tnewhash = 0;\n\t\t\n\t\t\td 
 = caql_getattr_internal(pCtx, newtup, Anum_pg_class_relam,  &isnull);\n\t\t\tnewhash = caql_pkhash(pCtx, newhash, d, isnull, OIDOID);\n\t\t\n\t\t\tcaql_lockwell(pCtx, AccessMethodRelationId, \n\t\t\t\t\t\t  AccessShareLock, newtup,\n\t\t\t\t\t\t  \"pg_am\",\n\t\t\t\t\t\t  \"oid\",\n\t\t\t\t\t\t  AmOidIndexId,\n\t\t\t\t\t\t  newhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\t\tif (HeapTupleIsValid(oldtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\t\t\n\t\t\toldhash = 0;\n\t\t\n\t\t\td = caql_getattr_internal(pCtx, oldtup, Anum_pg_class_relam,  &isnull);\n\t\t\toldhash = caql_pkhash(pCtx, oldhash, d, isnull, OIDOID);\n\t\t\n\t\t\tcaql_lockwell(pCtx, AccessMethodRelationId, \n\t\t\t\t\t\t  AccessShareLock, oldtup,\n\t\t\t\t\t\t  \"pg_am\",\n\t\t\t\t\t\t  \"oid\",\n\t\t\t\t\t\t  AmOidIndexId,\n\t\t\t\t\t\t  oldhash,\n\t\t\t\t\t\t  dontWait,\n\t\t\t\t\t\t  false /* don't ignore invalid tuple */\n\t\t\t\t);\n\t\t}\n\t\ti
 f (HeapTupleIsValid(newtup))\n\t\t{\n\t\t\tDatum\t\td;\n\t\t\tbool\t\tisnull;\n\

<TRUNCATED>


Mime
View raw message