pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: ocean_li_996@163.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17236: Postgres core on pstate->p_multiassign_exprs
Date: Mon, 18 Oct 2021 22:10:46 -0400
Message-ID: <1732941.1634609446@sss.pgh.pa.us> (raw)
In-Reply-To: <17236-3210de9bcba1d7ca@postgresql.org>
References: <17236-3210de9bcba1d7ca@postgresql.org>

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





view thread (3+ messages)  latest in thread

Message-ID: <1732941.1634609446@sss.pgh.pa.us>
Permalink:  ../1732941.1634609446@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1732941.1634609446@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, ocean_li_996@163.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #17236: Postgres core on pstate->p_multiassign_exprs
  In-Reply-To: <1732941.1634609446@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox