diff options
author | Bruce Momjian <bruce@momjian.us> | 1996-11-30 18:07:02 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 1996-11-30 18:07:02 +0000 |
commit | 63df35e24943477ad04e4cde6186687c42aa48bb (patch) | |
tree | 40627c56b099e65665e66f368f98e1a177b73ffc /src/backend/parser/parse_query.c | |
parent | f0a9e64afd1d2401abc269274113e4384bf537b9 (diff) | |
download | postgresql-63df35e24943477ad04e4cde6186687c42aa48bb.tar.gz postgresql-63df35e24943477ad04e4cde6186687c42aa48bb.zip |
This patch changes quite a few instances of references of Oid's
as ints and longs. Touches on quite a few function args as
well. Most other files look ok as far as Oids go...still checking
though...
Since Oids are type'd as unsigned ints, they should prolly be used
with the %ud format string in elog and sprintf messages. Not sure
what kind of strangeness that could produce.
Darren King
Diffstat (limited to 'src/backend/parser/parse_query.c')
-rw-r--r-- | src/backend/parser/parse_query.c | 46 |
1 files changed, 25 insertions, 21 deletions
diff --git a/src/backend/parser/parse_query.c b/src/backend/parser/parse_query.c index 3feabdc4742..30028c3f81d 100644 --- a/src/backend/parser/parse_query.c +++ b/src/backend/parser/parse_query.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/Attic/parse_query.c,v 1.9 1996/11/19 05:06:39 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/Attic/parse_query.c,v 1.10 1996/11/30 18:06:34 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -175,7 +175,8 @@ expandAll(ParseState *pstate, char *relname, char *refname, int *this_resno) List *te_tail = NIL, *te_head = NIL; Var *varnode; int varattno, maxattrs; - int type_id, type_len; + Oid type_id; + int type_len; RangeTblEntry *rte; rte = refnameRangeTableEntry(pstate->p_rtable, refname); @@ -208,7 +209,7 @@ expandAll(ParseState *pstate, char *relname, char *refname, int *this_resno) * set itself is not. */ te->resdom = makeResdom((AttrNumber) (*this_resno)++, - (Oid)type_id, + type_id, (Size)type_len, attrname, (Index)0, @@ -290,8 +291,8 @@ disallow_setop(char *op, Type optype, Node *operand) static Node * make_operand(char *opname, Node *tree, - int orig_typeId, - int true_typeId) + Oid orig_typeId, + Oid true_typeId) { Node *result; Type true_type; @@ -340,7 +341,7 @@ make_operand(char *opname, Expr * make_op(char *opname, Node *ltree, Node *rtree) { - int ltypeId, rtypeId; + Oid ltypeId, rtypeId; Operator temp; OperatorTupleForm opform; Oper *newop; @@ -398,10 +399,11 @@ make_op(char *opname, Node *ltree, Node *rtree) return result; } -int +Oid find_atttype(Oid relid, char *attrname) { - int attid, vartype; + int attid; + Oid vartype; Relation rd; rd = heap_open(relid); @@ -429,10 +431,11 @@ find_atttype(Oid relid, char *attrname) Var * -make_var(ParseState *pstate, char *refname, char *attrname, int *type_id) +make_var(ParseState *pstate, char *refname, char *attrname, Oid *type_id) { Var *varnode; - int vnum, attid, vartypeid; + int vnum, attid; + Oid vartypeid; Relation rd; RangeTblEntry *rte; @@ -444,7 +447,7 @@ make_var(ParseState *pstate, char *refname, char *attrname, int *type_id) rd = heap_open(rte->relid); - attid = nf_varattno(rd, (char *) attrname); + attid = nf_varattno(rd, attrname); if (attid == InvalidAttrNumber) elog(WARN, "Invalid attribute %s\n", attrname); vartypeid = att_typeid(rd, attid); @@ -473,15 +476,15 @@ ArrayRef * make_array_ref(Node *expr, List *indirection) { - Oid typearray; - HeapTuple type_tuple; + Oid typearray; + HeapTuple type_tuple; TypeTupleForm type_struct_array, type_struct_element; - ArrayRef *aref; - int reftype; + ArrayRef *aref; + Oid reftype; List *upperIndexpr=NIL; List *lowerIndexpr=NIL; - typearray = (Oid) exprType(expr); + typearray = exprType(expr); type_tuple = SearchSysCacheTuple(TYPOID, ObjectIdGetDatum(typearray), @@ -548,12 +551,12 @@ make_array_set(Expr *target_expr, List *lowerIndexpr, Expr *expr) { - Oid typearray; - HeapTuple type_tuple; + Oid typearray; + HeapTuple type_tuple; TypeTupleForm type_struct_array; TypeTupleForm type_struct_element; - ArrayRef *aref; - int reftype; + ArrayRef *aref; + Oid reftype; typearray = exprType((Node*)target_expr); @@ -717,7 +720,8 @@ void checkTargetTypes(ParseState *pstate, char *target_colname, char *refname, char *colname) { - int attrtype_id, attrtype_target, resdomno_id, resdomno_target; + Oid attrtype_id, attrtype_target; + int resdomno_id, resdomno_target; Relation rd; RangeTblEntry *rte; |