Re: Re: [HACKERS] Postgresql OO Patch

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Chris <chris(at)bitmead(dot)com>
Cc: Postgres Hackers List <hackers(at)postgresql(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: Re: [HACKERS] Postgresql OO Patch
Date: 2000-05-20 12:24:44
Message-ID: 200005201224.IAA17561@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

> Tom Lane wrote:
>
> > It's kinda fuzzy, but in practice I'd say the readers of pgsql-hackers
> > and maybe pgsql-general.
>
> One more time for the <general> mailing list...
>
> Hands up if you have objections to the patch I recently submitted for
> postgresql. It fixes the long standing bit-rot / bug that DELETE and
> UPDATE don't work on inheritance hierarchies, and it adds the ONLY
> syntax as mentioned in SQL3 and as implemented by Informix. The downside
> is it breaks compatibility with the old inheritance syntax. But there is
> a backward compatibility mode. I.e. "SELECT * FROM foobar*" becomes
> "SELECT * FROM foobar", and "SELECT * from foobar" becomes "SELECT *
> FROM ONLY foobar".
>
> Benefits:
> *) SQL3 says it.
> *) Informix does it.
> *) If you never used inheritance it doesn't affect you.
> *) Performance is unaffected.
> *) There is a backwards compatibility mode via SET.
> *) My own experience says strongly that this will greatly reduce
> programmer bugs because the default is much more common (laziness
> usually leads us to discard the "*" to the detriment of future
> inheritance data model changes.)
> *) It is more OO since by default a <subclass> IS A <baseclass>.
>
> Disadvantage:
> *) You need to make a one line change to any programs that use
> inheritance to include the back-compatibility SET mode.

Well, it seems many of us forgot the valid arguments for the change.
Matching SQL3 and Informix's behavior is a good thing. Considering how
broken our current inheritance implementation is, backward compatibility
is not a must, and you have a SET option for that too. Great.

--
Bruce Momjian | http://www.op.net/~candle
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ned Lilly 2000-05-20 13:31:30 RPM troubleshoot
Previous Message Bruce Momjian 2000-05-20 11:37:59 Re: Alias in WHERE clause

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2000-05-20 13:33:11 plpgsql chapter in docs
Previous Message Bruce Momjian 2000-05-20 11:35:38 Re: rules on INSERT can't UPDATE new instance?