Commit 0fc13f58 authored by Bruce Momjian's avatar Bruce Momjian

Make sure resdomno for update/insert match attribute number for

rewrite system.  Restructure parse_target to make it easier to
understand.
parent a06ba33c
......@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_clause.c,v 1.23 1998/08/05 04:49:09 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/parse_clause.c,v 1.24 1998/08/25 03:17:26 momjian Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -272,14 +272,14 @@ findTargetlistEntry(ParseState *pstate, Node *node, List *tlist, int clause)
switch(nodeTag(node))
{
case T_Attr:
target_result = transformTargetIdent(pstate, node, makeNode(TargetEntry),
target_result = MakeTargetEntryIdent(pstate, node,
&((Attr*)node)->relname, NULL,
((Attr*)node)->relname, TRUE);
lappend(tlist, target_result);
break;
case T_Ident:
target_result = transformTargetIdent(pstate, node, makeNode(TargetEntry),
target_result = MakeTargetEntryIdent(pstate, node,
&((Ident*)node)->name, NULL,
((Ident*)node)->name, TRUE);
lappend(tlist, target_result);
......@@ -294,7 +294,7 @@ findTargetlistEntry(ParseState *pstate, Node *node, List *tlist, int clause)
case T_FuncCall:
case T_A_Expr:
target_result = MakeTargetlistExpr(pstate, "resjunk", expr, FALSE, TRUE);
target_result = MakeTargetEntryExpr(pstate, "resjunk", expr, FALSE, TRUE);
lappend(tlist, target_result);
break;
......
This diff is collapsed.
......@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: parse_target.h,v 1.9 1998/08/05 04:49:15 scrappy Exp $
* $Id: parse_target.h,v 1.10 1998/08/25 03:17:29 momjian Exp $
*
*-------------------------------------------------------------------------
*/
......@@ -25,9 +25,8 @@
extern List *transformTargetList(ParseState *pstate, List *targetlist);
extern List *makeTargetNames(ParseState *pstate, List *cols);
extern TargetEntry *
transformTargetIdent(ParseState *pstate,
MakeTargetEntryIdent(ParseState *pstate,
Node *node,
TargetEntry *tent,
char **resname,
char *refname,
char *colname,
......@@ -35,7 +34,7 @@ transformTargetIdent(ParseState *pstate,
extern Node *
CoerceTargetExpr(ParseState *pstate, Node *expr,
Oid type_id, Oid attrtype);
TargetEntry * MakeTargetlistExpr(ParseState *pstate,
TargetEntry * MakeTargetEntryExpr(ParseState *pstate,
char *colname,
Node *expr,
List *arrayRef,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment