News for hackers. Stuff that matters.
Re:SQL language proposal: JOIN FOREIGN by bradleyjg on Thursday December 30, 2021 @08:10PM (#29743690)
PostgresSQL isn’t SQL though. Vendor extensions have done all kinds of inelegant or even outright ill advised things from the beginning.
Re:SQL language proposal: JOIN FOREIGN by JoelJacobson on Thursday December 30, 2021 @08:58PM (#29743978)
The INSERT ... ON CONFLICT UPDATE patch has been documented here: https://wiki.postgresql.org/wiki/UPSERT#UPSERT_as_implemente...

There are some clear benefits possible only thanks to specifying constraint names. Quoted from the link:

* The SQL-standard MERGE doesn't provide for choosing an index, so use of a unique index would need to be conditioned on equality quals against indexed columns in order to provide the behavior being discussed for UPSERT.

* The ON expression will need to be evaluated to see whether it properly compares to a unique index on the target table. Initially this will need to be done to determine whether the MERGE is allowed at all; later it will determine which sort of plan is allowed. It would be easier to match an index name, provided the index name is known and stable.

Re:SQL language proposal: JOIN FOREIGN by yunohn on Friday December 31, 2021 @07:52AM (#29747565)
> PostgresSQL isn’t SQL though

What is SQL acc. to you? MS-SQL, MySQL, SQLITE, Bigquery “Standard SQL”?

Re:SQL language proposal: JOIN FOREIGN by bradleyjg on Friday December 31, 2021 @11:14AM (#29749375)
Standards published by ISO/IEC.
Re:SQL language proposal: JOIN FOREIGN by yunohn on Friday December 31, 2021 @11:31AM (#29749553)
Sure, but where is that pure standard implemented?
Re:SQL language proposal: JOIN FOREIGN by bradleyjg on Friday December 31, 2021 @12:15PM (#29750055)
Why does it need to be implemented somewhere?
Re:SQL language proposal: JOIN FOREIGN by yunohn on Friday December 31, 2021 @12:19PM (#29750103)
What do you mean?

If the ISO SQL is not implemented by any SQL DB, and you denounce PostgreSQL/etc version of SQL - what is left over?

Re:SQL language proposal: JOIN FOREIGN by bradleyjg on Friday December 31, 2021 @01:47PM (#29751120)
I’m not denouncing PostgreSQL. There’s things that are appropriate for a standard and other, sometimes far less elegant, things that are appropriate for a concrete implementation. The linked article propose a change to the standard. If it had only proposed a non-standard vendor extension for some or other database we wouldn’t be having this discussion.