Re: BUG #5314: Error in nested composite types in plpgsql.

From: Oleg Serov <serovov(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5314: Error in nested composite types in plpgsql.
Date: 2010-02-24 12:12:59
Message-ID: cec7c6df1002240412i3918354fo29f9cf15f4eebb72@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

When it could be fixed?

On Thu, Feb 11, 2010 at 9:58 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> 2010/2/10 Oleg Serov <serovov(at)gmail(dot)com>:
>>> Somebody will fix this bug or not?
>
>> I'm not sure whether this is a bug.
>
> Yeah, I think it is.  The problem is that exec_move_row is taking too
> many shortcuts with nulls.  If the input record is short of fields it
> is willing to pass this data to exec_assign_value:
>
>                                value = (Datum) 0;
>                                isnull = true;
>                                valtype = InvalidOid;
>
> The invalid datatype value doesn't matter in the scalar case, but
> if the target is a sub-row it fails the type_is_rowtype() sanity
> check in exec_assign_value.
>
> The cleanest fix would probably be to use the target variable's
> datatype here instead of InvalidOid.  Alternatively, we could
> change exec_assign_value to not apply the sanity check unless
> the input is non-null.
>
>                        regards, tom lane
>

--
С уважением

Олег Серов

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Meskes 2010-02-24 13:55:33 Re: BUG #5327: postgresql gives checksum error when upgrading 8.2.6 binaries to 8.2.14 in windows.
Previous Message Zoltan Kovacs 2010-02-24 10:30:22 BUG #5345: non-administrator users cannot create databases with special encoding