Re: syncing a serial across tables

Поиск
Список
Период
Сортировка
От Volkan YAZICI
Тема Re: syncing a serial across tables
Дата
Msg-id 7104a737050512110218bb26c@mail.gmail.com
обсуждение исходный текст
Ответ на syncing a serial across tables  ("Keith Worthington" <keithw@narrowpathinc.com>)
Ответы Re: syncing a serial across tables
Список pgsql-novice
Hi,

On 5/12/05, Keith Worthington <keithw@narrowpathinc.com> wrote:
> I believe I need to use a serial column in two tables and keep then synched.
> I am thinking that I could use an AFTER INSERT trigger and INSERT currval()
> into the second table to keep them synched.  Has anyone done this before?  Is
> this a bad idea?

If both columns in both table will have the same value, why don't you
just reference one to another? This will keep synchorization
automaticly.

Regards.

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

Предыдущее
От: "Keith Worthington"
Дата:
Сообщение: syncing a serial across tables
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: syncing a serial across tables