diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2003-02-09 06:56:28 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2003-02-09 06:56:28 +0000 |
commit | 39b7ec330923b5a2746720101fbd83c1dd418aea (patch) | |
tree | 42cce57b7c823f65091b5e10c434a494716e0f82 /src/backend/optimizer/util | |
parent | 3646ab58b435e53dabd863d11b052e03220bb964 (diff) |
Create a distinction between Lists of integers and Lists of OIDs, to get
rid of the assumption that sizeof(Oid)==sizeof(int). This is one small
step towards someday supporting 8-byte OIDs. For the moment, it doesn't
do much except get rid of a lot of unsightly casts.
Diffstat (limited to 'src/backend/optimizer/util')
-rw-r--r-- | src/backend/optimizer/util/clauses.c | 12 | ||||
-rw-r--r-- | src/backend/optimizer/util/plancat.c | 8 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/backend/optimizer/util/clauses.c b/src/backend/optimizer/util/clauses.c index bd5706b5e21..71b5909d207 100644 --- a/src/backend/optimizer/util/clauses.c +++ b/src/backend/optimizer/util/clauses.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.128 2003/02/08 20:20:55 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.129 2003/02/09 06:56:27 tgl Exp $ * * HISTORY * AUTHOR DATE MAJOR EVENT @@ -566,7 +566,7 @@ contain_mutable_functions_walker(Node *node, void *context) foreach(opid, sublink->operOids) { - if (op_volatile((Oid) lfirsti(opid)) != PROVOLATILE_IMMUTABLE) + if (op_volatile(lfirsto(opid)) != PROVOLATILE_IMMUTABLE) return true; } /* else fall through to check args */ @@ -633,7 +633,7 @@ contain_volatile_functions_walker(Node *node, void *context) foreach(opid, sublink->operOids) { - if (op_volatile((Oid) lfirsti(opid)) == PROVOLATILE_VOLATILE) + if (op_volatile(lfirsto(opid)) == PROVOLATILE_VOLATILE) return true; } /* else fall through to check args */ @@ -718,7 +718,7 @@ contain_nonstrict_functions_walker(Node *node, void *context) foreach(opid, sublink->operOids) { - if (!op_strict((Oid) lfirsti(opid))) + if (!op_strict(lfirsto(opid))) return true; } /* else fall through to check args */ @@ -1679,7 +1679,7 @@ inline_function(Oid funcid, List *args, HeapTuple func_tuple, return NULL; /* Check for recursive function, and give up trying to expand if so */ - if (intMember(funcid, active_fns)) + if (oidMember(funcid, active_fns)) return NULL; /* Check permission to call function (fail later, if not) */ @@ -1824,7 +1824,7 @@ inline_function(Oid funcid, List *args, HeapTuple func_tuple, * add the current function to the context list of active functions. */ newexpr = eval_const_expressions_mutator(newexpr, - lconsi(funcid, active_fns)); + lconso(funcid, active_fns)); return (Expr *) newexpr; diff --git a/src/backend/optimizer/util/plancat.c b/src/backend/optimizer/util/plancat.c index 1f62a45648a..029ddae189c 100644 --- a/src/backend/optimizer/util/plancat.c +++ b/src/backend/optimizer/util/plancat.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.78 2003/02/08 20:20:55 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.79 2003/02/09 06:56:27 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -98,7 +98,7 @@ get_relation_info(Oid relationObjectId, RelOptInfo *rel) foreach(indexoidscan, indexoidlist) { - Oid indexoid = lfirsti(indexoidscan); + Oid indexoid = lfirsto(indexoidscan); Relation indexRelation; Form_pg_index index; IndexOptInfo *info; @@ -270,7 +270,7 @@ join_selectivity(Query *root, /* * find_inheritance_children * - * Returns an integer list containing the OIDs of all relations which + * Returns a list containing the OIDs of all relations which * inherit *directly* from the relation with OID 'inhparent'. * * XXX might be a good idea to create an index on pg_inherits' inhparent @@ -305,7 +305,7 @@ find_inheritance_children(Oid inhparent) while ((inheritsTuple = heap_getnext(scan, ForwardScanDirection)) != NULL) { inhrelid = ((Form_pg_inherits) GETSTRUCT(inheritsTuple))->inhrelid; - list = lappendi(list, inhrelid); + list = lappendo(list, inhrelid); } heap_endscan(scan); heap_close(relation, AccessShareLock); |