Re: request for sql3 compliance for the update command

From: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Hannu Krosing" <hannu(at)tm(dot)ee>
Cc: "Dave Cramer" <dave(at)fastcrypt(dot)com>, "Peter Eisentraut" <peter_e(at)gmx(dot)net>, "Pgsql Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: request for sql3 compliance for the update command
Date: 2003-02-20 16:05:57
Message-ID: 03AF4E498C591348A42FC93DEA9661B885BA@mail.vale-housing.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> -----Original Message-----
> From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
> Sent: 20 February 2003 14:31
> To: Hannu Krosing
> Cc: Dave Cramer; Peter Eisentraut; Pgsql Hackers
> Subject: Re: [HACKERS] request for sql3 compliance for the
> update command
>
>
> Hannu Krosing <hannu(at)tm(dot)ee> writes:
> > Are you against it just on grounds of cleanliness and ANSI
> compliance,
> > or do you see more serious problems in letting it in ?
>
> At this point it seems there are two different things being
> tossed about. I originally understood Dave to be asking for
> parens to be allowed around individual target column names,
> which seems a useless frammish to me. What Bruce has pointed
> out is that a syntax that lets you assign multiple columns
> from a single rowsource would be an actual improvement in
> functionality, or at least in convenience and efficiency. (It
> would also be a substantial bit of work, which is why I think
> this isn't what Dave was offering a quick patch to do...)
> What I'd like to know right now is which interpretation
> Informix actually implements.
>
> I don't like adding nonstandard syntaxes that add no
> functionality --- but if Informix has done what Bruce is
> talking about, that's a different matter altogether.

Informix SE allows me to do:

CREATE TABLE djp(col1 INTEGER, col2 INTEGER)
INSERT INTO djp VALUES(1, 2)
UPDATE djp SET(col1, col2) = (3, 4)

However

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

Results in a syntax error. I don't have Informix IDS so I don't know if
that can do it.

Regards, Dave.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message scott.marlowe 2003-02-20 16:20:13 Re: request for sql3 compliance for the update command
Previous Message Tom Lane 2003-02-20 15:59:15 Re: A bad behavior under autocommit off mode