Re: In-place upgrade: catalog side

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM>
Cc: Greg Smith <gsmith(at)gregsmith(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: In-place upgrade: catalog side
Date: 2008-12-04 13:48:05
Message-ID: 87hc5k127e.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Zdenek Kotala <Zdenek(dot)Kotala(at)Sun(dot)COM> writes:

> Gregory Stark napsal(a):
>
>> How about adding a special syntax for CREATE TABLE which indicates to include
>> a dropped column in that position? Then pg_dump could have a -X option to
>> include those columns as placeholders. Something like:
>>
>> CREATE TABLE foo (
>> col1 integer,
>> NULL COLUMN,
>> col2 integer
>> );
>
> You need to know a size of the attribute for fetchattr function.

True. and the alignment. I guess those would have to be in the syntax as well
since we don't even know what type those columns were previously. The type
might not even exist any more.

This is an internal syntax so I don't see any reason to bother making new
keywords just to pretty up the syntax. I don't see a problem with just doing
something like "NULL COLUMN (2,1)"

The only constraint it seems to me is that it should be an unlikely string for
someone to come up with accidentally from a simple syntax error. That's why I
originally suggested two reserved keywords. But even NULL(2,1) seems like it
would be fine.

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's 24x7 Postgres support!

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2008-12-04 14:08:13 Re: Re: pgsql: Properly unregister OpenSSL callbacks when libpq is done with
Previous Message tmp 2008-12-04 13:32:51 Optimizing DISTINCT with LIMIT