SELECT updatability clause defective. - Mailing list pgsql-bugs

From pgsql-bugs@postgresql.org
Subject SELECT updatability clause defective.
Date
Msg-id 200105091622.f49GMj217496@hub.org
Whole thread Raw
Responses Re: SELECT updatability clause defective.
List pgsql-bugs
Jerome O\'Neil (joneil@combimatrix.com) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
SELECT updatability clause defective.

Long Description
The syntax for select updatability clause is non-standard.  Postgres describes select updatability as

SELECT ...
 [FOR UDATE [OF tablename]]

While SQL-92 BNF describes it as

SELECT ...
 [FOR UPDATE [OF <column name list>]]

This breaks portability for third party tools (like BEA Weblogic JMS hint hint...)

Also, your bug tool doesn't like people with apostrophies in their name.

Sample Code
CREATE TABLE foo (column1 int4, column2 int4);
INSERT INTO foo VALUES (1,2);

-- Broken Postgres syntax
SELECT column1 FROM foo where column1 = 1 FOR UPDATE OF foo;

-- Nice and friendly SQL-92 syntax
SELECT column1 FROM foo where column1 = 1 FOR UPDATE OF column1;


No file was uploaded with this report

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Another plpgsql crash
Next
From: pgsql-bugs@postgresql.org
Date:
Subject: Better dump of foreign key data