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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Inspection of row types in pl/pgsql and pl/sql
Дата
Msg-id 17110.1258226857@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Inspection of row types in pl/pgsql and pl/sql  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: Inspection of row types in pl/pgsql and pl/sql
Список pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> Tom Lane wrote:
>> Perhaps it would help if we looked at some specific use-cases that
>> people need, rather than debating abstractly.  What do you need your
>> generic trigger to *do*?

> The two things I have wanted most badly in the past are

> a) to be able to address a field in NEW and OLD by a string name 
> (usually passed in via a trigger argument) and

But what are you then going to do with that field?  Are you just
assuming that it will be of a pre-agreed datatype?  Or that you
can perform some specific operation on it?  What are you expecting
will happen if it isn't or can't?

> b) to be able to discover the names if the fields in NEW and OLD

It doesn't seem hard or ugly to provide an API for that, but again
I'm wondering what happens next.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: Inspection of row types in pl/pgsql and pl/sql
Следующее
От: Robert Haas
Дата:
Сообщение: patch - per-tablespace random_page_cost/seq_page_cost