Re: More DROP COLUMN

From: Hannu Krosing <hannu(at)tm(dot)ee>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: More DROP COLUMN
Date: 2002-07-15 08:17:52
Message-ID: 1026721072.29268.6.camel@taru.tm.ee
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 2002-07-15 at 06:06, Christopher Kings-Lynne wrote:
> > > 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...

perhaps starting it with spaces instead of _ would make it even harder
to write by accident, so tha name could be
" dropped 0000000001"

or to make it even more self documenting store the drop time,
" col001 dropped(at)020715(dot)101427"
--------------------------------

---------------
Hannu

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zeugswetter Andreas SB SD 2002-07-15 09:10:03 Re: More DROP COLUMN
Previous Message Luis Alberto Amigo Navarro 2002-07-15 07:45:36 Re: [HACKERS] please help on query