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 17:48:36
Message-ID: 5316.1258134516@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:
> I'd like to replace this function-generating function by a generic
> trigger function that works for all tables. Due to the lack of any way
> to inspect the *structure* of a record type, however, I'd have to use a
> C language function for that, which induces quite some maintenance
> headaches (especially if deployed on windows).

Trying to do this in plpgsql is doomed to failure and heartache, because
it's fundamentally a strongly typed language. The proposed functions
won't fix that and hence will be unusable in practice. I'd suggest
either using C, or using one of the less-strongly-typed PLs.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-11-13 17:50:11 Re: Listen / Notify rewrite
Previous Message Robert Haas 2009-11-13 17:42:33 Re: next CommitFest