diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2002-08-02 18:15:10 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2002-08-02 18:15:10 +0000 |
commit | 38bb77a5d15aa022248488bc8c0147139ce120a9 (patch) | |
tree | d01573bceae2db61eb97421f91c6068ef8522b66 /src/backend/commands/indexcmds.c | |
parent | 5e6528adf726429463a5c1f3edf712f98d6b5f7e (diff) | |
download | postgresql-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/commands/indexcmds.c')
-rw-r--r-- | src/backend/commands/indexcmds.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c index 4049e7435c5..9edebc1e690 100644 --- a/src/backend/commands/indexcmds.c +++ b/src/backend/commands/indexcmds.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.79 2002/07/29 23:46:35 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.80 2002/08/02 18:15:06 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -294,10 +294,7 @@ FuncIndexArgs(IndexInfo *indexInfo, HeapTuple tuple; Form_pg_attribute att; - tuple = SearchSysCache(ATTNAME, - ObjectIdGetDatum(relId), - PointerGetDatum(arg), - 0, 0); + tuple = SearchSysCacheAttName(relId, arg); if (!HeapTupleIsValid(tuple)) elog(ERROR, "DefineIndex: attribute \"%s\" not found", arg); att = (Form_pg_attribute) GETSTRUCT(tuple); @@ -387,10 +384,7 @@ NormIndexAttrs(IndexInfo *indexInfo, if (attribute->name == NULL) elog(ERROR, "missing attribute for define index"); - atttuple = SearchSysCache(ATTNAME, - ObjectIdGetDatum(relId), - PointerGetDatum(attribute->name), - 0, 0); + atttuple = SearchSysCacheAttName(relId, attribute->name); if (!HeapTupleIsValid(atttuple)) elog(ERROR, "DefineIndex: attribute \"%s\" not found", attribute->name); |