Re: [HACKERS] Re: issue: record or row variable cannot be part ofmultiple-item INTO list - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: [HACKERS] Re: issue: record or row variable cannot be part ofmultiple-item INTO list
Date
Msg-id CAKFQuwa++t=SPyXfQHX4OjGMzzetkkitDuJsQ2dCaHVDYvhOOg@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Re: issue: record or row variable cannot be part of multiple-item INTO list  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] Re: issue: record or row variable cannot be part of multiple-item INTO list
Re: [HACKERS] Re: issue: record or row variable cannot be part of multiple-item INTO list
List pgsql-hackers
On Tue, Sep 19, 2017 at 11:29 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Aside from being inconsistent, it doesn't cover all
the cases --- what if you have just one query output column, that is
composite, and you'd like it to go into a composite variable?  That
doesn't work today, and this patch doesn't fix it, but it does create
enough confusion that we never would be able to fix it.
Actually, this does work, just not the way one would immediately expect.

​ct1: (text, text)​

DO $$
SELECT ('1', '2')::ct1 INTO c1;
RAISE NOTICE '%', c1;
END;
$$;

​Notice: ("(1,2)",)

And so, yes, my thinking has a backward compatibility problem.  But one that isn't fixable when constrained by backward compatibility - whether this patch goes in or not.

David J.

pgsql-hackers by date:

Previous
From: ilmari@ilmari.org (Dagfinn Ilmari Mannsåker)
Date:
Subject: Re: [HACKERS] Show backtrace when tap tests fail
Next
From: Andres Freund
Date:
Subject: Re: [HACKERS] Show backtrace when tap tests fail