Re: Inspection of row types in pl/pgsql and pl/sql

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Florian G(dot) Pflug" <fgp(at)phlo(dot)org>
Cc: Postgresql-Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Inspection of row types in pl/pgsql and pl/sql
Date: 2009-11-13 21:37:39
Message-ID: 10255.1258148259@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Florian G. Pflug" <fgp(at)phlo(dot)org> writes:
> Tom Lane wrote:
>> Trying to do this in plpgsql is doomed to failure and heartache,

> Well, the proposed functions at least allow for some more flexibility in
> working with row types, given that you know in advance which types you
> will be dealing with (but not necessarily the precise ordering and
> number of the record's fields). They might feel a bit kludgy because of
> the "anyelement" dummy argument that bridges the gap between the
> statically typed nature of SQL and the rather dynamic RECORDs, but the
> kludgy-ness factor is still within reasonable limits I think.

It sounds pretty d*mn klugy to me, and I stand by my comment that it
isn't going to work anyway. When you try it you are going to run into
"parameter type doesn't match that while preparing the plan" errors.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zdenek Kotala 2009-11-13 21:38:07 Re: [PATCH] dtrace probes for memory manager
Previous Message Dan Colish 2009-11-13 21:37:31 Re: CTE containing ambiguous columns