Conformance of PostgreSQL to ANSI/ISO Standard

Lists: pgsql-hackers
From: "J M Sykes" <mike(dot)sykes(at)acm(dot)org>
To: <info(at)pgsql(dot)com>
Subject: Conformance of PostgreSQL to ANSI/ISO Standard
Date: 2003-04-13 16:30:34
Message-ID: 00d101c301da$0235bb80$730a6ad5@oakdale2
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

I have been looking at

ftp://ftp.be.postgresql.org/postgresql/doc/7.2/reference-7.2-A4.pdf

and on page 70, CREATE TABLE, Compatibility, I find a statement that
suggests the writer was under a misapprehension.

You say first:

<quote>
The CREATE TABLE conforms to SQL92 Intermediate and to a subset of SQL99,
with exceptions listed below and in the descriptions above.

Temporary Tables
In addition to the local temporary table, SQL92 also defines a CREATE GLOBAL
TEMPORARY TABLE statement. Global temporary tables are also visible to other
sessions.
</quote>

Although your temporary tables seem to be effectively the same as IBM DB2's

DECLARE GLOBAL TEMPORARY TABLE

and Oracle's

CREATE GLOBAL TEMPORARY TABLE

However, none of these conform to SQL:1992 at any level (or to the temporary
tables feature of SQL:1999), so you're in good company, but apparently
mistaken.

I shall be happy to try to elucidate further if you're interested, as I have
been scrutinizing this area of the SQL standard recently.

FYI, though not a member of the ANSI committee, I do contribute to the ISO
working group.

Mike Sykes.


From: Mike Mascari <mascarm(at)mascari(dot)com>
To: J M Sykes <mike(dot)sykes(at)acm(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Conformance of PostgreSQL to ANSI/ISO Standard
Date: 2003-04-13 19:54:45
Message-ID: 3E99C085.4040008@mascari.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

J M Sykes wrote:
> I have been looking at
>
> ftp://ftp.be.postgresql.org/postgresql/doc/7.2/reference-7.2-A4.pdf
>
> and on page 70, CREATE TABLE, Compatibility, I find a statement that
> suggests the writer was under a misapprehension.
>
> You say first:
>
> <quote>
> The CREATE TABLE conforms to SQL92 Intermediate and to a subset of SQL99,
> with exceptions listed below and in the descriptions above.

...

> However, none of these conform to SQL:1992 at any level (or to
> the temporary tables feature of SQL:1999), so you're in good
> company, but apparently mistaken.

Yeah. This was the subject of my confusion as well. Tom sorts it
out:

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=3E28A02C.5090900%40mascari.com&rnum=1&prev=/groups%3Fq%3DMike%2BMascari%2Btemp%2Bglobal%26ie%3DUTF-8%26oe%3DUTF-8%26hl%3Den

> FYI, though not a member of the ANSI committee, I do contribute to the ISO
> working group.
>
> Mike Sykes.

Mike Mascari


From: Mike Mascari <mascarm(at)mascari(dot)com>
To: J M Sykes <mike(dot)sykes(at)acm(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Conformance of PostgreSQL to ANSI/ISO Standard
Date: 2003-04-13 20:17:46
Message-ID: 3E99C5EA.9040604@mascari.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

I wrote:

> J M Sykes wrote:
>
>>I have been looking at
>>
>>ftp://ftp.be.postgresql.org/postgresql/doc/7.2/reference-7.2-A4.pdf
>>
>>and on page 70, CREATE TABLE, Compatibility, I find a statement that
>>suggests the writer was under a misapprehension.
>>
>>You say first:
>>
>><quote>
>>The CREATE TABLE conforms to SQL92 Intermediate and to a subset of SQL99,
>>with exceptions listed below and in the descriptions above.
>
> ...
>
>>However, none of these conform to SQL:1992 at any level (or to
>>the temporary tables feature of SQL:1999), so you're in good
>>company, but apparently mistaken.
>
>
> Yeah. This was the subject of my confusion as well. Tom sorts it
> out:
>
> http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=3E28A02C.5090900%40mascari.com&rnum=1&prev=/groups%3Fq%3DMike%2BMascari%2Btemp%2Bglobal%26ie%3DUTF-8%26oe%3DUTF-8%26hl%3Den
>
>
>>FYI, though not a member of the ANSI committee, I do contribute to the ISO
>>working group.
>>
>>Mike Sykes.

I should also have written:

1. Obviously the PostgreSQL docs need to be updated as they are
still incorrect in the development version

2. Since you contribute to the ISO working group may I make a
suggestion? The standard for temporary tables includes the
options ON COMMIT { PRESERVE ROWS | DELETE ROWS }. 7.4 of
PostgreSQL, thanks to Gavin Sherry, will include DROP as one of
the ON COMMIT options. Any chance at that getting standardized?

Mike Mascari
mascarm(at)mascari(dot)com