Re: request for sql3 compliance for the update command - Mailing list pgsql-hackers

From Mike Aubury
Subject Re: request for sql3 compliance for the update command
Date
Msg-id 200302201909.54460.mike@aubit.com
Whole thread Raw
In response to Re: request for sql3 compliance for the update command  ("Dave Page" <dpage@vale-housing.co.uk>)
List pgsql-hackers
Informix supports 2 different styles for the update - your one would have to
be written :


UPDATE djp SET(col1, col2) = ((SELECT col1,col2 FROM some_other_table))

Notice the double brackets !
The first signifies a list of values - the second is the brackets around the
subquery...

(NB If you try to reference the same table in the Update - you'll get an
error....)


For single columns you could still write :

UPDATE djp SET col1 = (SELECT col2 FROM some_other_table)

Notice - one more set of brackets on the right as on the left....


> UPDATE djp SET(col1, col2) = (SELECT col2, col1 FROM djp)



pgsql-hackers by date:

Previous
From: Dave Cramer
Date:
Subject: Re: request for sql3 compliance for the update command
Next
From: Tom Lane
Date:
Subject: Re: A bad behavior under autocommit off mode