Re: plpgsql - Inserting DEFAULT Value.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: plpgsql - Inserting DEFAULT Value.
Дата
Msg-id 7403.1087760271@sss.pgh.pa.us
обсуждение исходный текст
Ответ на plpgsql - Inserting DEFAULT Value.  (Vams <vmudrageda@charter.net>)
Ответы Re: plpgsql - Inserting DEFAULT Value.  (Vams <vmudrageda@charter.net>)
Список pgsql-general
Vams <vmudrageda@charter.net> writes:
> Important point: I need this to be a generic function.  I got multiple
> tables that have a id column, each with their own unique sequences,
> and I want to use the same function for all of them.  So NEW.id :=
> nextval('some_sequence') can't work.

Nonetheless, that is the direction you want to go.

Consider passing the appropriate sequence name to the function as a
trigger parameter.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Using Large Object in PostgreSQL
Следующее
От: t_murtagh@vodafone.ie (Thomas)
Дата:
Сообщение: PostGres ODBC MFC Application