Re: syncing a serial across tables

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: syncing a serial across tables
Дата
Msg-id 20050512181415.GA29389@wolff.to
обсуждение исходный текст
Ответ на Re: syncing a serial across tables  (Volkan YAZICI <volkan.yazici@gmail.com>)
Список pgsql-novice
On Thu, May 12, 2005 at 21:02:31 +0300,
  Volkan YAZICI <volkan.yazici@gmail.com> wrote:
> 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.

If they really are supposed to be 1 to 1, then the references will need
to go both ways.

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

Предыдущее
От: Volkan YAZICI
Дата:
Сообщение: Re: syncing a serial across tables
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: Using PgSQL in high volume and throughput problem