Re: Assignment to composite type variable fails inside function but running query separately yields correct type & value ?

From: Tobias Gierke <tobias(dot)gierke(at)code-sourcery(dot)de>
To: PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: Assignment to composite type variable fails inside function but running query separately yields correct type & value ?
Date: 2021-01-26 15:19:37
Message-ID: 81bf6542-4a06-9abc-a0d3-a95bc0da2200@code-sourcery.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Thanks for the hint & sorry for the noise, it's working now !

> On Tue, Jan 26, 2021 at 5:56 AM Tobias Gierke
> <tobias(dot)gierke(at)code-sourcery(dot)de
> <mailto:tobias(dot)gierke(at)code-sourcery(dot)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.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2021-01-26 16:11:22 Re: BUG #16837: Invalid memory access on \h in psql
Previous Message David G. Johnston 2021-01-26 15:08:07 Re: Assignment to composite type variable fails inside function but running query separately yields correct type & value ?