Re: pgsql-server/src/bin/psql print.c - Mailing list pgsql-committers

From Tom Lane
Subject Re: pgsql-server/src/bin/psql print.c
Date
Msg-id 25324.1036375468@sss.pgh.pa.us
Whole thread Raw
In response to Re: pgsql-server/src/bin/psql print.c  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
Responses Re: pgsql-server/src/bin/psql print.c  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
List pgsql-committers
"Christopher Kings-Lynne" <chriskl@familyhealth.com.au> writes:
> Nup - DROP COLUMN (well at least the code I wrote) deliberately prevents you
> from doing that!

Yeah, but we ripped it out later, per this CVS log entry:

2002-09-28 16:00  tgl

    * src/: backend/access/common/tupdesc.c,
    backend/commands/tablecmds.c, backend/executor/execTuples.c,
    backend/executor/nodeAgg.c, backend/parser/parse_target.c,
    test/regress/expected/alter_table.out (REL7_3_STABLE),
    backend/access/common/tupdesc.c, backend/commands/tablecmds.c,
    backend/executor/execTuples.c, backend/executor/nodeAgg.c,
    backend/parser/parse_target.c,
    test/regress/expected/alter_table.out: 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.

I forget the details of the discussion leading up to that, but we
decided that prohibiting a DROP of a table's last column was creating
so much ugliness that we should try to remove the restriction; and upon
looking into it, there weren't *that* many places that would choke on
it.  So as of the last month or so, you can do it.  I would not be
surprised to find one or two more lurking problems with zero-column
tables, but I'd rather fix those than have the weird special case.

            regards, tom lane

pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pgsql-server/src/backend/commands cluster.c
Next
From: "Christopher Kings-Lynne"
Date:
Subject: Re: pgsql-server/src/bin/psql print.c