PG Bug reporting form <noreply@postgresql.org> writes:
> Postgres will crash when executing the following SQL:
> CREATE TABLE v0 ( v1 INT , v2 INT ) ;
> UPDATE v0 SET ( v1 , v2 ) = ( SELECT v2 + 127 , v1 FROM v0 ) , v2 = ( v2 ,
> v1 ) , v1 = 53 , v2 = 54 ;
Hmm, with assertions off I get
ERROR: column "v2" is of type integer but expression is of type record
LINE 1: ...( v1 , v2 ) = ( SELECT v2 + 127 , v1 FROM v0 ) , v2 = ( v2 ,
^
HINT: You will need to rewrite or cast the expression.
and if I remove that I get a complaint about multiple assignments
to the same column.
Were you expecting this query to do something useful, or was it
just fuzzing?
(Not that we shouldn't fix the assertion failure. I'm just
wondering about the context.)
regards, tom lane