diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2006-03-23 00:19:30 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2006-03-23 00:19:30 +0000 |
commit | 19956e0d5388b11a1cc3eaf2dbf628aa531ce331 (patch) | |
tree | f2c7071f4daee4588d4c004d809bd327baa4adde /src/backend/parser/parse_relation.c | |
parent | a3f0b3d68f9a5357a3f72b40a45bcc714a9e0649 (diff) | |
download | postgresql-19956e0d5388b11a1cc3eaf2dbf628aa531ce331.tar.gz postgresql-19956e0d5388b11a1cc3eaf2dbf628aa531ce331.zip |
Add error location info to ResTarget parse nodes. Allows error cursor to be supplied
for various mistakes involving INSERT and UPDATE target columns.
Diffstat (limited to 'src/backend/parser/parse_relation.c')
-rw-r--r-- | src/backend/parser/parse_relation.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/backend/parser/parse_relation.c b/src/backend/parser/parse_relation.c index e8e11ad167a..d3e138e8ecb 100644 --- a/src/backend/parser/parse_relation.c +++ b/src/backend/parser/parse_relation.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/parser/parse_relation.c,v 1.121 2006/03/16 00:31:55 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/parser/parse_relation.c,v 1.122 2006/03/23 00:19:30 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1703,7 +1703,9 @@ get_tle_by_resno(List *tlist, AttrNumber resno) } /* - * given relation and att name, return id of variable + * given relation and att name, return attnum of variable + * + * Returns InvalidAttrNumber if the attr doesn't exist (or is dropped). * * This should only be used if the relation is already * heap_open()'ed. Use the cache version get_attnum() @@ -1732,11 +1734,7 @@ attnameAttNum(Relation rd, const char *attname, bool sysColOK) } /* on failure */ - ereport(ERROR, - (errcode(ERRCODE_UNDEFINED_COLUMN), - errmsg("column \"%s\" of relation \"%s\" does not exist", - attname, RelationGetRelationName(rd)))); - return InvalidAttrNumber; /* keep compiler quiet */ + return InvalidAttrNumber; } /* specialAttNum() |