Thread: PostgreSQL syntax question
The following syntax (which is legal under Oracle) does not parse under PostreSQL 6.3.2. update table1 set col1=(select col2 from table2 where col3='x') where col4='z'; Is there a variant of the syntax which does work? Cheers and thanks, Stephen. ======================================================================== Stephen Davies Consulting scldad@sdc.com.au Adelaide, South Australia. Voice: 61-8-82728863 Computing & Network solutions. Fax: 61-8-82741015
SD> The following syntax (which is legal under Oracle) does not parse under SD> PostreSQL 6.3.2. SD> update table1 set col1=(select col2 from table2 where col3='x') where col4='z'; This syntax is SQL standard but seems that PostgreSQL doesn't support "scalar subqueries" yet. I don't see this on TODO things ? What about to add it to TODO file ? Jose'
> SD> The following syntax (which is legal under Oracle) does not parse under > SD> PostreSQL 6.3.2. > > SD> update table1 set col1=(select col2 from table2 where col3='x') where col4='z'; > This syntax is SQL standard but seems that PostgreSQL doesn't > support "scalar subqueries" yet. > I don't see this on TODO things ? What about to add it to TODO file ? Already there: * Allow subqueries in target list -- Bruce Momjian | 830 Blythe Avenue maillist@candle.pha.pa.us | Drexel Hill, Pennsylvania 19026 http://www.op.net/~candle | (610) 353-9879(w) + If your life is a hard drive, | (610) 853-3000(h) + Christ can be your backup. |