mirror of
https://github.com/postgres/postgres.git
synced 2025-06-16 06:01:02 +03:00
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.
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user