From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | ocean_li_996(at)163(dot)com |
Cc: | pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: BUG #17236: Postgres core on pstate->p_multiassign_exprs |
Date: | 2021-10-19 02:10:46 |
Message-ID: | 1732941.1634609446@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
PG Bug reporting form <noreply(at)postgresql(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Noah Misch | 2021-10-19 03:02:12 | Re: CREATE INDEX CONCURRENTLY does not index prepared xact's data |
Previous Message | Michael Paquier | 2021-10-19 02:08:06 | Re: BUG #17220: ALTER INDEX ALTER COLUMN SET (..) with an optionless opclass makes index and table unusable |