mirror of
https://github.com/postgres/postgres.git
synced 2025-07-07 00:36:50 +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:
@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteHandler.c,v 1.104 2002/07/18 04:43:50 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteHandler.c,v 1.105 2002/08/02 18:15:07 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -264,6 +264,10 @@ rewriteTargetList(Query *parsetree, Relation target_relation)
|
||||
Form_pg_attribute att_tup = target_relation->rd_att->attrs[attrno-1];
|
||||
TargetEntry *new_tle = NULL;
|
||||
|
||||
/* We can ignore deleted attributes */
|
||||
if (att_tup->attisdropped)
|
||||
continue;
|
||||
|
||||
/*
|
||||
* Look for targetlist entries matching this attr. We match by
|
||||
* resno, but the resname should match too.
|
||||
|
Reference in New Issue
Block a user