diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 1999-07-19 00:26:20 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 1999-07-19 00:26:20 +0000 |
commit | 7f76eab140e703b7847b107245a669e2010886c0 (patch) | |
tree | 8c9d01c654aa8de0e14c0d446817ba60c33d0199 /src/include/parser/parse_target.h | |
parent | c9814427722798751fa5bf254f597d722d76b5e3 (diff) |
Rewrite parser's handling of INSERT ... SELECT so that processing
of the SELECT part of the statement is just like a plain SELECT. All
INSERT-specific processing happens after the SELECT parsing is done.
This eliminates many problems, e.g. INSERT ... SELECT ... GROUP BY using
the wrong column labels. Ensure that DEFAULT clauses are coerced to
the target column type, whether or not stored clause produces the right
type. Substantial cleanup of parser's array support.
Diffstat (limited to 'src/include/parser/parse_target.h')
-rw-r--r-- | src/include/parser/parse_target.h | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/src/include/parser/parse_target.h b/src/include/parser/parse_target.h index bd520d1bab9..c2babecb769 100644 --- a/src/include/parser/parse_target.h +++ b/src/include/parser/parse_target.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: parse_target.h,v 1.14 1999/07/15 23:04:03 momjian Exp $ + * $Id: parse_target.h,v 1.15 1999/07/19 00:26:18 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -15,23 +15,14 @@ #include "parser/parse_node.h" -#define EXPR_COLUMN_FIRST 1 -#define EXPR_RELATION_FIRST 2 - extern List *transformTargetList(ParseState *pstate, List *targetlist); -extern List *makeTargetNames(ParseState *pstate, List *cols); -extern TargetEntry *MakeTargetEntryIdent(ParseState *pstate, - Node *node, - char **resname, - char *refname, - char *colname, - bool resjunk); +extern TargetEntry *transformTargetEntry(ParseState *pstate, + Node *node, Node *expr, + char *colname, bool resjunk); +extern void updateTargetListEntry(ParseState *pstate, TargetEntry *tle, + char *colname, List *indirection); extern Node *CoerceTargetExpr(ParseState *pstate, Node *expr, - Oid type_id, Oid attrtype); -TargetEntry *MakeTargetEntryExpr(ParseState *pstate, - char *colname, - Node *expr, - List *arrayRef, - bool resjunk); + Oid type_id, Oid attrtype); +extern List *makeTargetNames(ParseState *pstate, List *cols); #endif /* PARSE_TARGET_H */ |