Re: [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: [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: [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: [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: [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: [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