Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-bugs by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group