Re: More DROP COLUMN - Mailing list pgsql-hackers

From Christopher Kings-Lynne
Subject Re: More DROP COLUMN
Date
Msg-id GNELIHDDFBOCMGBFGEFOMECECDAA.chriskl@familyhealth.com.au
Whole thread Raw
In response to Re: More DROP COLUMN  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: More DROP COLUMN  (Hannu Krosing <hannu@tm.ee>)
List pgsql-hackers
> > We could name the fields "________dropped_x" sort of thing perhaps????
>
> In practice that would certainly work, especially if we increase
> NAMEDATALEN to 128 or so, as has been proposed repeatedly.

Well, x is just an integer anyway, so even with 32 it's not a problem...

In case anyone was wondering btw, if a column named 'dropped_1' already
exists when you drop column 1 in the table, it will be renamed like this:

dropped1_1

And if that also exists, it will become

dropped2_1

etc.  I put that extra number after dropped and not at the end so prevent it
being off the end of a 32 character name.

> Alternatively, we could invest a lot of work to make it possible for
> attname to be NULL, but I don't see the payoff...

Yeah, I think a weird name should be good enough...

Chris



pgsql-hackers by date:

Previous
From: Curt Sampson
Date:
Subject: Re: More DROP COLUMN
Next
From: Hannu Krosing
Date:
Subject: Re: More DROP COLUMN