diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2003-08-11 23:04:50 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2003-08-11 23:04:50 +0000 |
| commit | 302f1a86dc1125f681b9a3b3509d1be7e33b0e4f (patch) | |
| tree | 9d31b15b5e5dac59aee0ce26597306a491512c31 /src/backend/nodes/print.c | |
| parent | 730b3a150238578505638ab2331bf569c89d8f7b (diff) | |
| download | postgresql-302f1a86dc1125f681b9a3b3509d1be7e33b0e4f.tar.gz | |
Rewriter and planner should use only resno, not resname, to identify
target columns in INSERT and UPDATE targetlists. Don't rely on resname
to be accurate in ruleutils, either. This fixes bug reported by
Donald Fraser, in which renaming a column referenced in a rule did not
work very well.
Diffstat (limited to 'src/backend/nodes/print.c')
| -rw-r--r-- | src/backend/nodes/print.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/backend/nodes/print.c b/src/backend/nodes/print.c index c3d702316d..c3417d8efa 100644 --- a/src/backend/nodes/print.c +++ b/src/backend/nodes/print.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/nodes/print.c,v 1.63 2003/08/04 02:39:59 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/nodes/print.c,v 1.64 2003/08/11 23:04:49 tgl Exp $ * * HISTORY * AUTHOR DATE MAJOR EVENT @@ -448,7 +448,8 @@ print_tl(List *tlist, List *rtable) { TargetEntry *tle = lfirst(tl); - printf("\t%d %s\t", tle->resdom->resno, tle->resdom->resname); + printf("\t%d %s\t", tle->resdom->resno, + tle->resdom->resname ? tle->resdom->resname : "<null>"); if (tle->resdom->ressortgroupref != 0) printf("(%u):\t", tle->resdom->ressortgroupref); else |
