Re: [SQL] update more than 1 table (mysql to postgres)

2004-02-01 Thread Tom Lane
>> In MySQL I can update 2 tables (parent, child) with a statement like this >> >> UPDATE parent LEFT JOIN child ON parent.pid = child.foreign_key SET >> parent.field1 = 'company', >> child.field2 = 'john' >> WHERE child.pid = 7 One has to wonder what the above construction is even intended to me

Re: [SQL] update more than 1 table (mysql to postgres)

2004-02-01 Thread Christopher Browne
Oops! [EMAIL PROTECTED] ("treeml") was seen spray-painting on a wall: > I am migrating from MySQL to Postagres. I have problem with postgres > updating 2 tables with one statement. > > In MySQL I can update 2 tables (parent, child) with a statement like this > > UPDATE parent LEFT JOIN child ON par

Re: [SQL] update more than 1 table (mysql to postgres)

2004-02-01 Thread postgres
On Fri, 30 Jan 2004, treeml wrote: > I am migrating from MySQL to Postagres. I have problem with postgres > updating 2 tables with one statement. > > In MySQL I can update 2 tables (parent, child) with a statement like this > > UPDATE parent LEFT JOIN child ON parent.pid = child.foreign_key SET

[SQL] update more than 1 table (mysql to postgres)

2004-02-01 Thread treeml
I am migrating from MySQL to Postagres. I have problem with postgres updating 2 tables with one statement. In MySQL I can update 2 tables (parent, child) with a statement like this UPDATE parent LEFT JOIN child ON parent.pid = child.foreign_key SET parent.field1 = 'company', child.field2 = 'john'