From: | Markus Winand <markus(dot)winand(at)winand(dot)at> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | VALUES ROW(...) |
Date: | 2020-01-28 20:32:20 |
Message-ID: | E7A4C091-E0D0-4C26-ACD6-062CC6A31105@winand.at |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi!
PostgreSQL does not accept the following standard conforming statement:
VALUES ROW(1,2), ROW(3,4)
There is a comment about this in the source code [0]:
/*
* We should allow ROW '(' expr_list ')' too, but that seems to require
* making VALUES a fully reserved word, which will probably break more apps
* than allowing the noise-word is worth.
*/
The latest release of MySQL (8.0.19) introduced table value constructors (VALUES), but **requires** the keyword ROW [1]. Of the 9 systems I tested, only MySQL and H2 accept ROW in VALUES [2].
Is it worth re-visiting this decision in order to improve standard conformance and MySQL (and H2) compability?
-markus
Refs:
[0] src/backend/parser/gram.y - https://github.com/postgres/postgres/blob/30012a04a6c8127397a8ab71e160d9c7e7fbe874/src/backend/parser/gram.y#L11893
[1] https://dev.mysql.com/doc/refman/8.0/en/values.html
[2] Not supporting it: Db2 11.5, MariaDB 10.4, Oracle 19c, SQL Server 2019, SQLite 3.30.0, Derby 10.15.1.3.
Some results published here: https://modern-sql.com/feature/values#compatibility
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2020-01-28 20:35:25 | Re: Allow to_date() and to_timestamp() to accept localized names |
Previous Message | Stephen Frost | 2020-01-28 20:29:18 | Re: Removing pg_pltemplate and creating "trustable" extensions |