Re: WIP: fix SET WITHOUT OIDS, add SET WITH OIDS

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: WIP: fix SET WITHOUT OIDS, add SET WITH OIDS
Date: 2009-02-08 20:46:48
Message-ID: 603c8f070902081246k27e055d1w36e6e99f1460be41@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Feb 8, 2009 at 11:51 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Andrew Dunstan <andrew(at)dunslane(dot)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.

+1. I really hate it (in any application, not just PostgreSQL) when
there's an option to add something but not delete it, delete it but
not put it back, etc. Personally, *I* would not have spent the time
to implement SET WITH OIDS, but since we now have the patch, I'm 100%
in favor of applying it. Most likely, very few people will use it,
but it doesn't cost us anything either, so I'm unclear why we would
tell Tom to go back and rip that functionality back out of his patch.
Sounds like bikeshedding to me.

...Robert

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2009-02-08 22:10:26 Re: Is a plan for lmza commpression in pg_dump
Previous Message Tom Lane 2009-02-08 19:27:00 Re: WIP: fix SET WITHOUT OIDS, add SET WITH OIDS