Re: Does Postgres Object-Relational Syntax follow Standard? - Mailing list pgsql-general

From Chris Travers
Subject Re: Does Postgres Object-Relational Syntax follow Standard?
Date
Msg-id CAKt_Zfu=N5Fkca6iz9v-kQinOcBLgDjG9nWBQw-bngmmHqggCQ@mail.gmail.com
Whole thread Raw
In response to Does Postgres Object-Relational Syntax follow Standard?  ("Will Rutherdale (rutherw)" <rutherw@cisco.com>)
Responses Re: Does Postgres Object-Relational Syntax follow Standard?  ("Will Rutherdale (rutherw)" <rutherw@cisco.com>)
List pgsql-general


On Tue, Oct 16, 2012 at 2:00 PM, Will Rutherdale (rutherw) <rutherw@cisco.com> wrote:
Hi.

I was having a discussion with people at work about the Postgres object-relational syntax.  The question came up:  does this follow an SQL standard?  Or is it rather a Postgres-only feature with different RDBMSs doing it differently?

I tried some quick checks on Google and Wikipedia but couldn't find clear answers.  There seem to be different SQL standards (for example SQL 2003, SQL 2008), but from what I can see, these don't cover object-relational syntax.

Not really.  The one area the standard discusses in this area, namely single inheritance for structured data types, is not supported by PostgreSQL. As far as I can tell, the SQL 2003 standard followed more or less the approach Illustra (which began as  a Pg fork but had a totally independent SQL implementation) but limited it to structured data types only and thus avoided issues like jagged rows (which survive in Informix, but pose practical programming challenges and therefore have never been supported on PostgreSQL).  The one area that is supported is CREATE TABLE foo OF TYPE bar; but that's pretty anemic support if you ask me.

In my view, while there are rough edges, the PostgreSQL approach is richer than the SQL 2003 approach, and I suspect the reason for the lack of SQL 2003 UNDER supertype support is that there hasn't been sufficient demand to justify implementing it.  This isn't a commonly used feature of Oracle or DB2.....

I would say that while there are some object-relational aspects to SQL 2003, the overlap between those and the PostgreSQL model is non-existent for practical purposes.  I have actually really come to like the PostgreSQL model. 

Best Wishes,
Chris Travers

pgsql-general by date:

Previous
From: Craig Ringer
Date:
Subject: Re: Does Postgres Object-Relational Syntax follow Standard?
Next
From: Craig Ringer
Date:
Subject: 9.1/9.2 SERIALIZABLE: expected serialization failure between INSERT and SELECT not encountered