From 39b7ec330923b5a2746720101fbd83c1dd418aea Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 9 Feb 2003 06:56:28 +0000 Subject: 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. --- src/backend/parser/parse_expr.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/backend/parser/parse_expr.c') diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c index 95b3a6297ae..e807dfe3f46 100644 --- a/src/backend/parser/parse_expr.c +++ b/src/backend/parser/parse_expr.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.142 2003/02/03 21:15:44 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.143 2003/02/09 06:56:28 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -488,7 +488,7 @@ transformExpr(ParseState *pstate, Node *expr) " to be used with quantified predicate subquery", opname); - sublink->operOids = lappendi(sublink->operOids, + sublink->operOids = lappendo(sublink->operOids, oprid(optup)); ReleaseSysCache(optup); @@ -554,7 +554,7 @@ transformExpr(ParseState *pstate, Node *expr) neww->result = (Expr *) transformExpr(pstate, warg); newargs = lappend(newargs, neww); - typeids = lappendi(typeids, exprType((Node *) neww->result)); + typeids = lappendo(typeids, exprType((Node *) neww->result)); } newc->args = newargs; @@ -583,7 +583,7 @@ transformExpr(ParseState *pstate, Node *expr) * code worked before, but it seems a little bogus to me * --- tgl */ - typeids = lconsi(exprType((Node *) newc->defresult), typeids); + typeids = lconso(exprType((Node *) newc->defresult), typeids); ptype = select_common_type(typeids, "CASE"); newc->casetype = ptype; @@ -830,7 +830,7 @@ transformColumnRef(ParseState *pstate, ColumnRef *cref) { char *name1 = strVal(lfirst(cref->fields)); char *name2 = strVal(lsecond(cref->fields)); - char *name3 = strVal(lfirst(lnext(lnext(cref->fields)))); + char *name3 = strVal(lthird(cref->fields)); /* Whole-row reference? */ if (strcmp(name3, "*") == 0) @@ -863,8 +863,8 @@ transformColumnRef(ParseState *pstate, ColumnRef *cref) { char *name1 = strVal(lfirst(cref->fields)); char *name2 = strVal(lsecond(cref->fields)); - char *name3 = strVal(lfirst(lnext(lnext(cref->fields)))); - char *name4 = strVal(lfirst(lnext(lnext(lnext(cref->fields))))); + char *name3 = strVal(lthird(cref->fields)); + char *name4 = strVal(lfourth(cref->fields)); /* * We check the catalog name and then ignore it. -- cgit v1.2.3