aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser/parse_func.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2002-08-02 18:15:10 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2002-08-02 18:15:10 +0000
commit38bb77a5d15aa022248488bc8c0147139ce120a9 (patch)
treed01573bceae2db61eb97421f91c6068ef8522b66 /src/backend/parser/parse_func.c
parent5e6528adf726429463a5c1f3edf712f98d6b5f7e (diff)
downloadpostgresql-38bb77a5d15aa022248488bc8c0147139ce120a9.tar.gz
postgresql-38bb77a5d15aa022248488bc8c0147139ce120a9.zip
ALTER TABLE DROP COLUMN works. Patch by Christopher Kings-Lynne,
code review by Tom Lane. Remaining issues: functions that take or return tuple types are likely to break if one drops (or adds!) a column in the table defining the type. Need to think about what to do here. Along the way: some code review for recent COPY changes; mark system columns attnotnull = true where appropriate, per discussion a month ago.
Diffstat (limited to 'src/backend/parser/parse_func.c')
-rw-r--r--src/backend/parser/parse_func.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/backend/parser/parse_func.c b/src/backend/parser/parse_func.c
index f92bbe8ac5c..677acf9d1a3 100644
--- a/src/backend/parser/parse_func.c
+++ b/src/backend/parser/parse_func.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.132 2002/06/20 20:29:32 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.133 2002/08/02 18:15:07 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1150,6 +1150,9 @@ setup_field_select(Node *input, char *attname, Oid relid)
AttrNumber attno;
attno = get_attnum(relid, attname);
+ if (attno == InvalidAttrNumber)
+ elog(ERROR, "Relation \"%s\" has no column \"%s\"",
+ get_rel_name(relid), attname);
fselect->arg = input;
fselect->fieldnum = attno;