Re: patch: plpgsql - access records with rec.(expr)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: patch: plpgsql - access records with rec.(expr)
Дата
Msg-id 26799.1101224030@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: patch: plpgsql - access records with rec.(expr)  (Matt <matt@kynx.org>)
Ответы Re: patch: plpgsql - access records with rec.(expr)  (Matt <matt@kynx.org>)
Re: patch: plpgsql - access records with rec.(expr)  (Joachim Wieland <joe@mcknight.de>)
Список 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 по дате отправления:

Предыдущее
От: "Bort, Paul"
Дата:
Сообщение: Re: [Testperf-general] Re: ExclusiveLock
Следующее
От: Patrick Welche
Дата:
Сообщение: Re: Trouble with plpgsql on 7.4.6