Re: patch: plpgsql - access records with rec.(expr) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: patch: plpgsql - access records with rec.(expr)
Date
Msg-id 26799.1101224030@sss.pgh.pa.us
Whole thread Raw
In response to Re: patch: plpgsql - access records with rec.(expr)  (Matt <matt@kynx.org>)
Responses Re: patch: plpgsql - access records with rec.(expr)
Re: patch: plpgsql - access records with rec.(expr)
List pgsql-hackers
Matt <matt@kynx.org> writes:
> It would be a good idea to check that the variable was either a constant
> or a trigger arg. This would stop the looping problem, since the type of
> the underlying field couldn't change.

What aboutfor i in ...    ... new.(tg_argv[i]) ...

> But I've somehow got the feeling that this sort of thing isn't the
> issue. The issue is whether we want to allow dynamic access to columns
> in any syntax at all. A simple yes or no would do :)

MHO: this is a really ugly wart on the language, and it does not solve
the problems people would want to solve.  It might solve *your* problem
but that's not enough to justify a wart of this size.

We do need to do something about the fact that EXECUTE can't access
plpgsql variables, though I'm afraid that fixing that is going to
require a rather complete overhaul of plpgsql :-(.  But it needs one
anyway.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Bort, Paul"
Date:
Subject: Re: [Testperf-general] Re: ExclusiveLock
Next
From: Patrick Welche
Date:
Subject: Re: Trouble with plpgsql on 7.4.6