What is the preferred syntax:

ALTER TABLE .. DROP COLUMN oid;

or

ALTER TABLE .. SET WITHOUT OIDS;
-- 
Rod Taylor <rbt@rbt.ca>

PGP Key: http://www.rbt.ca/rbtpub.asc
16 Jan 2003 13:41:44 -0500
Rod Taylor <rbt@rbt.ca>
Dropping OID column
On Thu, 2003-01-16 at 13:41, Rod Taylor wrote:
> ALTER TABLE .. SET WITHOUT OIDS;

I'd prefer this, as it's more similar to the CREATE TABLE syntax.

Cheers,

Neil
-- 
Neil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC




16 Jan 2003 13:59:01 -0500
Neil Conway <neilc@samurai.com>
Re: Dropping OID column
Rod Taylor <rbt@rbt.ca> writes:
> What is the preferred syntax:
> ALTER TABLE .. DROP COLUMN oid;
> or
> ALTER TABLE .. SET WITHOUT OIDS;

If we ever got around to supporting the inverse function (add oids),
I do not think we'd want to spell it like "ADD COLUMN oid" --- that
would interfere with making a plain user column named "oid", which was
one of the reasons why people wanted to be able to drop OIDs in the
first place.

So I lean towards the SET WITH/WITHOUT OIDS syntax.  That keeps it
clearly out of the domain of user columns.

			regards, tom lane

Thu, 16 Jan 2003 14:07:26 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: Dropping OID column 
Tom Lane writes:

> If we ever got around to supporting the inverse function (add oids),
> I do not think we'd want to spell it like "ADD COLUMN oid" --- that
> would interfere with making a plain user column named "oid", which was
> one of the reasons why people wanted to be able to drop OIDs in the
> first place.

Is there really a reason why OIDs can't be a pure user-space column?

-- 
Peter Eisentraut   peter_e@gmx.net


Thu, 16 Jan 2003 22:58:32 +0100 (CET)
Peter Eisentraut <peter_e@gmx.net>
Re: Dropping OID column 
Peter Eisentraut <peter_e@gmx.net> writes:
> Is there really a reason why OIDs can't be a pure user-space column?

We'd need some kluge to keep "SELECT *" from including OID.  Also I'd be
a bit worried about the impact on the cost of HeapTupleGetOid --- it
might not matter, or it might.

			regards, tom lane

Thu, 16 Jan 2003 16:59:58 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: Dropping OID column 
I guess I'd prefer the DROP COLUMN syntax.  It means we don't have to add
another non-standard command, and people can figure out how to drop the oid
column just by trying...

Chris

> -----Original Message-----
> From: pgsql-hackers-owner@postgresql.org
> [mailto:pgsql-hackers-owner@postgresql.org]On Behalf Of Rod Taylor
> Sent: Friday, 17 January 2003 2:42 AM
> To: PostgreSQL-development
> Subject: [HACKERS] Dropping OID column
>
>
> What is the preferred syntax:
>
> ALTER TABLE .. DROP COLUMN oid;
>
> or
>
> ALTER TABLE .. SET WITHOUT OIDS;
> --
> Rod Taylor <rbt@rbt.ca>
>
> PGP Key: http://www.rbt.ca/rbtpub.asc
>


Fri, 17 Jan 2003 09:57:16 +0800
"Christopher Kings-Lynne" <chriskl@familyhealth.com.au>
Re: Dropping OID column