Dropping OID column 
Author Message
 Dropping OID column

Quote:

> ALTER TABLE .. SET WITHOUT OIDS;

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

Cheers,

Neil
--

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.***.com/



Tue, 05 Jul 2005 03:11:32 GMT
 Dropping OID column

Quote:

> 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

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org



Tue, 05 Jul 2005 03:12:11 GMT
 Dropping OID column

Quote:

> 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

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command



Tue, 05 Jul 2005 06:38:13 GMT
 Dropping OID column

Quote:
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?

--

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster



Tue, 05 Jul 2005 06:38:53 GMT
 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

Quote:
> -----Original Message-----


> 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;
> --

> PGP Key: http://www.rbt.ca/rbtpub.asc

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command



Tue, 05 Jul 2005 09:57:35 GMT
 
 [ 5 post ] 

 Relevant Pages 

1. Oid and Oid Vector

2. OID Install Problem, OID does not start through 9iAS

3. 7.3 and HEAD broken for dropped columns of dropped types

4. Query to fetch all lo and oid tables/columns in a database

5. Drop a column and add a new column

6. could not drop column MyColumn from table MyTable Error 207: Invalid Column Name

7. Problem with DROP COLUMN and ALTER COLUMN

8. How to change a column's type/How to drop a column

9. Dropping column silently kills multi-coumn index (was [ODBC] Error when accessing tables with deleted columns)

10. Dropping column silently kills multi-coumn index (was [ODBC] Error when accessing tables with deleted columns)

11. Postgresql7.3: after dropping a column a .............pg.dropped............ column exists

12. SQL Help with Drop Column


 
Powered by phpBB® Forum Software