SELECT updatability clause defective.

From: pgsql-bugs(at)postgresql(dot)org
To: pgsql-bugs(at)postgresql(dot)org
Subject: SELECT updatability clause defective.
Date: 2001-05-09 16:22:45
Message-ID: 200105091622.f49GMj217496@hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Jerome O\'Neil (joneil(at)combimatrix(dot)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

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message pgsql-bugs 2001-05-09 17:09:08 Better dump of foreign key data
Previous Message Tom Lane 2001-05-09 15:09:02 Re: Another plpgsql crash