Re: [HACKERS] Re: SQL compliance

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>, PostgreSQL Development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] Re: SQL compliance
Date: 2000-02-19 17:16:10
Message-ID: 12732.950980570@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> * Things such as SELECT MAX(ALL x) FROM y; don't work. [6.5]
> {This seems to be an easy grammar fix.}

Yes, and since ALL is already a reserved word, it wouldn't break
anything to accept it. I'll try to take care of that today.
None of the other stuff is quite as easy to fix :-(

> * INSERT INTO table DEFAULT VALUES [13.8]
> {Looks like a grammar fix as well.}

Huh? We do have DEFAULT VALUES --- what is wrong exactly?

What we don't seem to have is full <table value constructor> per 7.2;
we only allow VALUES ... in INSERT, whereas SQL allows it in other
constructs where a sub-SELECT would be legal, and we don't accept
multiple rows in VALUES. For example, you should be able to write

INSERT INTO t VALUES (1,2,3), (4,5,6), (7,8,9), ...

but we don't accept that now. The spec also shows several examples like

CONSTRAINT DOMAIN_CONSTRAINTS_CHECK_DEFERRABLE
CHECK ( ( IS_DEFERRABLE, INITIALLY_DEFERRED ) IN
( VALUES ( 'NO', 'NO' ),
( 'YES', 'NO' ),
( 'YES', 'YES' ) ) )

Thanks for digging through the spec ... I bet that was tedious ...

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2000-02-19 19:21:18 Nasty portability glitch in plperl
Previous Message Tom Lane 2000-02-19 17:01:27 Re: [HACKERS] psql and Control-C