Re: WIP: fix SET WITHOUT OIDS, add SET WITH OIDS - Mailing list pgsql-hackers

From Tom Lane
Subject Re: WIP: fix SET WITHOUT OIDS, add SET WITH OIDS
Date
Msg-id 21240.1234111882@sss.pgh.pa.us
Whole thread Raw
In response to Re: WIP: fix SET WITHOUT OIDS, add SET WITH OIDS  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: WIP: fix SET WITHOUT OIDS, add SET WITH OIDS  (Zdenek Kotala <Zdenek.Kotala@Sun.COM>)
Re: WIP: fix SET WITHOUT OIDS, add SET WITH OIDS  (Robert Haas <robertmhaas@gmail.com>)
Re: WIP: fix SET WITHOUT OIDS, add SET WITH OIDS  (David Fetter <david@fetter.org>)
Re: WIP: fix SET WITHOUT OIDS, add SET WITH OIDS  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> Tom Lane wrote:
>> The attached patch (which lacks doc changes or regression
>> tests as yet) does that, and also adds the inverse SET WITH OIDS
>> operation to do what you'd expect, ie, add an OID column if it isn't
>> there already.

> Why would we add an operation to implement a deprecated feature?

Well, it was always intended to be that way:
http://archives.postgresql.org/pgsql-patches/2002-12/msg00071.php

The originally submitted patch didn't work very well
http://archives.postgresql.org/pgsql-patches/2003-01/msg00011.php
and what we ended up doing was applying just the SET WITHOUT OIDS half
of it, but my feeling always was that that was for lack of round tuits
rather than that it was a good place to be.  Given the implementation
at the time it would've taken a lot of extra code to do SET WITH OIDS,
so nobody did get around to it.  But subsequent changes in the ALTER
code have made it possible to piggyback on ALTER ADD COLUMN easily ---
which is what this patch is trying to demonstrate.

Now, if you want to argue that we should get rid of SET WITHOUT OIDS
altogether, I'm not sure I could dispute it.  But if we have the ability
to do that ISTM we should offer the reverse too.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: WIP: fix SET WITHOUT OIDS, add SET WITH OIDS
Next
From: Zdenek Kotala
Date:
Subject: Re: WIP: fix SET WITHOUT OIDS, add SET WITH OIDS