Re: Inspection of row types in pl/pgsql and pl/sql - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Inspection of row types in pl/pgsql and pl/sql
Date
Msg-id 5316.1258134516@sss.pgh.pa.us
Whole thread Raw
In response to Inspection of row types in pl/pgsql and pl/sql  ("Florian G. Pflug" <fgp@phlo.org>)
Responses Re: Inspection of row types in pl/pgsql and pl/sql  ("Florian G. Pflug" <fgp@phlo.org>)
List pgsql-hackers
"Florian G. Pflug" <fgp@phlo.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


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: next CommitFest
Next
From: Tom Lane
Date:
Subject: Re: Listen / Notify rewrite