From: Tobias Gierke <tobias.gierke@code-sourcery.de>
To: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: Assignment to composite type variable fails inside function but running query separately yields correct type & value ?
Date: Tue, 26 Jan 2021 16:19:37 +0100
Message-ID: <81bf6542-4a06-9abc-a0d3-a95bc0da2200@code-sourcery.de> (raw)
In-Reply-To: <CAKFQuwapumtrdWSWZXNGoLxqC8eeseeZx1H-EgB3C3Qor+y_-g@mail.gmail.com>
References: <4446d7d8-08a3-03d6-3f46-ac80239dbfb9@code-sourcery.de>
<CAKFQuwapumtrdWSWZXNGoLxqC8eeseeZx1H-EgB3C3Qor+y_-g@mail.gmail.com>
Thanks for the hint & sorry for the noise, it's working now !
> On Tue, Jan 26, 2021 at 5:56 AM Tobias Gierke
> <tobias.gierke@code-sourcery.de
> <mailto:tobias.gierke@code-sourcery.de>> wrote:
>
> voip$# SELECT (t1.a_major, t1.a_minor )::version_num INTO
> _myid
>
> Bug or feature ?
>
>
> Feature. The first column of the select result gets placed into the
> first field of _myid, the second column of the select result gets
> placed into the second field of _myid. This is how assignment to
> row-typed variables (and record-typed too) works in pl/pgsql.
>
> David J.
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: tobias.gierke@code-sourcery.de, pgsql-bugs@lists.postgresql.org
Subject: Re: Assignment to composite type variable fails inside function but running query separately yields correct type & value ?
In-Reply-To: <81bf6542-4a06-9abc-a0d3-a95bc0da2200@code-sourcery.de>
* 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