diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2002-09-28 20:00:19 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2002-09-28 20:00:19 +0000 |
commit | 6d0d15c451739396851d3f93f81c63a47535bf1e (patch) | |
tree | 79370fcc4630f1857bede315eb4d9beae6d7f90b /src/backend/executor/execTuples.c | |
parent | 23616b47d54d0a0d39a626485299403264f7d8e1 (diff) | |
download | postgresql-6d0d15c451739396851d3f93f81c63a47535bf1e.tar.gz postgresql-6d0d15c451739396851d3f93f81c63a47535bf1e.zip |
Make the world at least somewhat safe for zero-column tables, and
remove the special case in ALTER DROP COLUMN to prohibit dropping a
table's last column.
Diffstat (limited to 'src/backend/executor/execTuples.c')
-rw-r--r-- | src/backend/executor/execTuples.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/src/backend/executor/execTuples.c b/src/backend/executor/execTuples.c index 1a5f835be1d..7b0df664c74 100644 --- a/src/backend/executor/execTuples.c +++ b/src/backend/executor/execTuples.c @@ -15,7 +15,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/execTuples.c,v 1.59 2002/09/04 20:31:17 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/execTuples.c,v 1.60 2002/09/28 20:00:19 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -560,23 +560,14 @@ ExecInitNullTupleSlot(EState *estate, TupleDesc tupType) TupleDesc ExecTypeFromTL(List *targetList, bool hasoid) { - List *tlitem; TupleDesc typeInfo; - Resdom *resdom; - Oid restype; + List *tlitem; int len; /* - * examine targetlist - if empty then return NULL - */ - len = ExecTargetListLength(targetList); - - if (len == 0) - return NULL; - - /* * allocate a new typeInfo */ + len = ExecTargetListLength(targetList); typeInfo = CreateTemplateTupleDesc(len, hasoid); /* @@ -585,6 +576,8 @@ ExecTypeFromTL(List *targetList, bool hasoid) foreach(tlitem, targetList) { TargetEntry *tle = lfirst(tlitem); + Resdom *resdom; + Oid restype; if (tle->resdom != NULL) { |