Re: BUG #5644: Selecting ROW() in variable with 9.0 not compatible with 8.4 - Mailing list pgsql-bugs

From Robert Haas
Subject Re: BUG #5644: Selecting ROW() in variable with 9.0 not compatible with 8.4
Date
Msg-id AANLkTimEw00mMBawUovRRaRrjLnStjreZJ=u5fiE7qWE@mail.gmail.com
Whole thread Raw
In response to Re: BUG #5644: Selecting ROW() in variable with 9.0 not compatible with 8.4  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Thu, Sep 16, 2010 at 9:30 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> On Wed, Sep 8, 2010 at 11:42 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>>> =A0SELECT ROW(10, 'a') INTO b.b2; -- ok in 8.4 but fails in 9.0 [ERROR:
>>>> =A0invalid input syntax for integer: "(10,a)"]
>
>>>> =A0SELECT 100, 'a' INTO b.b2; =A0 -- ok in 9.0 but fails in 8.4 [ERROR=
: =A0cannot assign non-composite value to a row variable]
>
>> If we know the types of everything, is it possible to make both cases wo=
rk?
>
> We don't know the types of everything at the point where the decision
> needs to be made. =A0Even if we did, allowing both would be a klugy
> unmaintainable mess IMO --- far more work than it's worth.

Bummer.  Maybe we should have more-different syntax for the two cases
then.  I've been bitten by this quite a few times over the years.

--=20
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #5644: Selecting ROW() in variable with 9.0 not compatible with 8.4
Next
From: Craig Ringer
Date:
Subject: Re: BUG #5661: The character encoding in logfile is confusing.