Re: How to access NEW or OLD field given only the field's name?

Поиск
Список
Период
Сортировка
От François Beausoleil
Тема Re: How to access NEW or OLD field given only the field's name?
Дата
Msg-id EFF10A72-25BB-4D91-8ADD-367C66074942@teksol.info
обсуждение исходный текст
Ответ на Re: How to access NEW or OLD field given only the field's name?  (Adrian Klaver <adrian.klaver@aklaver.com>)
Список pgsql-general

Le 2014-03-19 à 19:48, Adrian Klaver a écrit :

On 03/19/2014 02:01 PM, François Beausoleil wrote:

Some experimenting showed that NEW.* does not work. So plan B:


EXECUTE 'SELECT $1.' || TG_ARGV[0] || INTO total USING NEW;
RAISE EXCEPTION 'Total: %, social_impressions: %', total,

Thank you, Adrian. I've accepted the following answer on StackExchange: http://dba.stackexchange.com/a/61304/3935

It's your solution, but with the extra call to format, preventing SQL injection attacks.

Thanks!
François

Вложения

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

Предыдущее
От: basti
Дата:
Сообщение: Backup WAL Replication Server
Следующее
От: José Pedro Santos
Дата:
Сообщение: Re: Dump Database