Re: How to make update statement to work

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Andrus Moor" <nospameetasoftnospam(at)online(dot)ee>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: How to make update statement to work
Date: 2005-03-27 07:57:10
Message-ID: 3550.1111910230@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

"Andrus Moor" <nospameetasoftnospam(at)online(dot)ee> writes:
> UPDATE demo.toode
> SET "liik"=NULL, "grupp"=NULL
> WHERE ("grupp", "liik") NOT IN
> (SELECT ("grupp", "liik") FROM "artliik")
> ERROR: operator does not exist: character = record

> How to write this UPDATE statement properly ?

Hmm ... Postgres wants it without the innermost parentheses:
(SELECT "grupp", "liik" FROM "artliik")

Offhand though I am not certain whether the way you wrote it is supposed
to be allowed according to the SQL spec. Does anyone think this should
have worked, and if so what's the chapter and verse that says so?

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Michael Fuhr 2005-03-27 08:04:35 Re: select a list of schema names
Previous Message Michael Fuhr 2005-03-27 07:47:20 Re: Foreign key