Re: [HACKERS] [PATCHES] extension for sql update

2006-08-13 Thread Robert Treat
On Saturday 12 August 2006 16:16, David Fetter wrote: On Fri, Aug 11, 2006 at 05:11:03PM -0500, Jim C. Nasby wrote: On Fri, Aug 11, 2006 at 10:59:45AM -0400, Bruce Momjian wrote: Peter Eisentraut wrote: Bruce Momjian wrote: Are we sure we don't want the patch for a non-subquery

Re: [HACKERS] [PATCHES] extension for sql update

2006-08-13 Thread Bruce Momjian
Robert Treat wrote: On Saturday 12 August 2006 16:16, David Fetter wrote: On Fri, Aug 11, 2006 at 05:11:03PM -0500, Jim C. Nasby wrote: On Fri, Aug 11, 2006 at 10:59:45AM -0400, Bruce Momjian wrote: Peter Eisentraut wrote: Bruce Momjian wrote: Are we sure we don't want the

Re: [HACKERS] [PATCHES] extension for sql update

2006-08-13 Thread Susanne Ebrecht
Bruce Momjian wrote: Robert Treat wrote: On Saturday 12 August 2006 16:16, David Fetter wrote: On Fri, Aug 11, 2006 at 05:11:03PM -0500, Jim C. Nasby wrote: On Fri, Aug 11, 2006 at 10:59:45AM -0400, Bruce Momjian wrote: Peter Eisentraut wrote: Bruce

Re: [HACKERS] [PATCHES] extension for sql update

2006-08-13 Thread Bruce Momjian
Susanne Ebrecht wrote: That's what I was thinking. Glad someone else replied. ;-) If you're looking for votes, +1. I'll gladly take a subset of the SQL standard UPDATE table SET (...) = (...) over having nothing. +1 here, too. :) +1 I am

Re: [HACKERS] [PATCHES] extension for sql update

2006-08-12 Thread David Fetter
On Fri, Aug 11, 2006 at 05:11:03PM -0500, Jim C. Nasby wrote: On Fri, Aug 11, 2006 at 10:59:45AM -0400, Bruce Momjian wrote: Peter Eisentraut wrote: Bruce Momjian wrote: Are we sure we don't want the patch for a non-subquery version of SET ROW for 8.2? o Allow UPDATE

Re: [HACKERS] [PATCHES] extension for sql update

2006-08-11 Thread Peter Eisentraut
Bruce Momjian wrote: Are we sure we don't want the patch for a non-subquery version of SET ROW for 8.2? o Allow UPDATE tab SET ROW (col, ...) = (...) for updating multiple columns It seems to be moderately useful as a notational convenience for now. Is it too hard to rip it back out

Re: [HACKERS] [PATCHES] extension for sql update

2006-08-11 Thread Bruce Momjian
Peter Eisentraut wrote: Bruce Momjian wrote: Are we sure we don't want the patch for a non-subquery version of SET ROW for 8.2? o Allow UPDATE tab SET ROW (col, ...) = (...) for updating multiple columns It seems to be moderately useful as a notational convenience for now.

Re: [HACKERS] [PATCHES] extension for sql update

2006-08-11 Thread Jim C. Nasby
On Fri, Aug 11, 2006 at 10:59:45AM -0400, Bruce Momjian wrote: Peter Eisentraut wrote: Bruce Momjian wrote: Are we sure we don't want the patch for a non-subquery version of SET ROW for 8.2? o Allow UPDATE tab SET ROW (col, ...) = (...) for updating multiple columns

Re: [HACKERS] [PATCHES] extension for sql update

2006-08-04 Thread Bruce Momjian
Are we sure we don't want the patch for a non-subquery version of SET ROW for 8.2? o Allow UPDATE tab SET ROW (col, ...) = (...) for updating multiple columns --- Tom Lane wrote: Peter Eisentraut [EMAIL

Re: [HACKERS] [PATCHES] extension for sql update

2006-07-31 Thread Peter Eisentraut
Am Mittwoch, 26. Juli 2006 22:58 schrieb Tom Lane: The reason people want this syntax is that they expect to be able to write, say, UPDATE mytab SET (foo, bar, baz) = (SELECT alpha, beta, gamma FROM othertab WHERE key = mytab.key); I don't find any derivation in the standard

Re: [HACKERS] [PATCHES] extension for sql update

2006-07-31 Thread Rod Taylor
On Mon, 2006-07-31 at 17:26 +0200, Peter Eisentraut wrote: Am Mittwoch, 26. Juli 2006 22:58 schrieb Tom Lane: The reason people want this syntax is that they expect to be able to write, say, UPDATE mytab SET (foo, bar, baz) = (SELECT alpha, beta, gamma FROM othertab WHERE

Re: [HACKERS] [PATCHES] extension for sql update

2006-07-31 Thread Jim C. Nasby
On Sun, Jul 30, 2006 at 08:38:30PM -0400, Rod Taylor wrote: On Sun, 2006-07-30 at 20:20 -0400, Robert Treat wrote: On Thursday 27 July 2006 09:28, Bruce Momjian wrote: Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: Tom Lane wrote: UPDATE mytab SET (foo, bar, baz) =

Re: [HACKERS] [PATCHES] extension for sql update

2006-07-31 Thread Tom Lane
Peter Eisentraut [EMAIL PROTECTED] writes: Am Mittwoch, 26. Juli 2006 22:58 schrieb Tom Lane: The reason people want this syntax is that they expect to be able to write, say, UPDATE mytab SET (foo, bar, baz) = (SELECT alpha, beta, gamma FROM othertab WHERE key = mytab.key); I don't find any

Re: [HACKERS] [PATCHES] extension for sql update

2006-07-30 Thread Robert Treat
On Thursday 27 July 2006 09:28, Bruce Momjian wrote: Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: Tom Lane wrote: UPDATE mytab SET (foo, bar, baz) = (SELECT alpha, beta, gamma FROM othertab WHERE key = mytab.key); That UPDATE example is interesting because I remember

Re: [HACKERS] [PATCHES] extension for sql update

2006-07-30 Thread Rod Taylor
On Sun, 2006-07-30 at 20:20 -0400, Robert Treat wrote: On Thursday 27 July 2006 09:28, Bruce Momjian wrote: Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: Tom Lane wrote: UPDATE mytab SET (foo, bar, baz) = (SELECT alpha, beta, gamma FROM othertab WHERE key = mytab.key);

Re: [HACKERS] [PATCHES] extension for sql update

2006-07-28 Thread Susanne Ebrecht
Am Donnerstag, den 27.07.2006, 08:30 -0400 schrieb Tom Lane: Susanne Ebrecht [EMAIL PROTECTED] writes: ... We could provide the mixed update syntax and leave the typed row value expression for the next release. Do you agree? I don't really see the point --- the patch won't provide any new

Re: [HACKERS] [PATCHES] extension for sql update

2006-07-27 Thread Susanne Ebrecht
Am Mittwoch, den 26.07.2006, 16:58 -0400 schrieb Tom Lane: Susanne Ebrecht [EMAIL PROTECTED] writes: This is a cute hack, but it does only a small part of what I think the spec says. Thank you for compliment. In the first place, the SQL syntax is pretty clear that you can combine simple

Re: [HACKERS] [PATCHES] extension for sql update

2006-07-27 Thread Tom Lane
Susanne Ebrecht [EMAIL PROTECTED] writes: ... We could provide the mixed update syntax and leave the typed row value expression for the next release. Do you agree? I don't really see the point --- the patch won't provide any new functionality in anything like its current form, because you can

Re: [HACKERS] [PATCHES] extension for sql update

2006-07-27 Thread Bruce Momjian
Tom Lane wrote: much anything that can generate a row. The patch as you have it provides nothing more than syntactic sugar for something people can do anyway. The reason people want this syntax is that they expect to be able to write, say, UPDATE mytab SET (foo, bar, baz) =

Re: [HACKERS] [PATCHES] extension for sql update

2006-07-27 Thread Tom Lane
Bruce Momjian [EMAIL PROTECTED] writes: Tom Lane wrote: UPDATE mytab SET (foo, bar, baz) = (SELECT alpha, beta, gamma FROM othertab WHERE key = mytab.key); That UPDATE example is interesting because I remember when using Informix that I had to do a separate SELECT statement for each UPDATE

Re: [HACKERS] [PATCHES] extension for sql update

2006-07-27 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian [EMAIL PROTECTED] writes: Tom Lane wrote: UPDATE mytab SET (foo, bar, baz) = (SELECT alpha, beta, gamma FROM othertab WHERE key = mytab.key); That UPDATE example is interesting because I remember when using Informix that I had to do a separate SELECT

Re: [HACKERS] [PATCHES] extension for sql update

2006-07-27 Thread Jim Nasby
On Jul 27, 2006, at 7:30 AM, Tom Lane wrote: Susanne Ebrecht [EMAIL PROTECTED] writes: ... We could provide the mixed update syntax and leave the typed row value expression for the next release. Do you agree? I don't really see the point --- the patch won't provide any new functionality in

Re: [HACKERS] [PATCHES] extension for sql update

2006-07-27 Thread Florian G. Pflug
Tom Lane wrote: Susanne Ebrecht [EMAIL PROTECTED] writes: ... We could provide the mixed update syntax and leave the typed row value expression for the next release. Do you agree? I don't really see the point --- the patch won't provide any new functionality in anything like its current form,

Re: [HACKERS] [PATCHES] extension for sql update

2006-07-27 Thread Bruce Momjian
Jim Nasby wrote: On Jul 27, 2006, at 7:30 AM, Tom Lane wrote: Susanne Ebrecht [EMAIL PROTECTED] writes: ... We could provide the mixed update syntax and leave the typed row value expression for the next release. Do you agree? I don't really see the point --- the patch won't provide any

Re: [HACKERS] [PATCHES] extension for sql update

2006-07-26 Thread Tom Lane
Susanne Ebrecht [EMAIL PROTECTED] writes: here is a patch that extends update syntax following the sql standard. The patch includes sgml documentation, too. UPDATE table SET (col1, col2, ...) = (val1, val2, ...), (colm, coln, ...) = (valm, valn, ...), ...; This is a cute hack, but it does