create parent after children

Поиск
Список
Период
Сортировка
От carlos.ohiggins@yahoo.com
Тема create parent after children
Дата
Msg-id f7e4b018-04c3-48c4-bf80-b1d0d8099f12@e17g2000hsg.googlegroups.com
обсуждение исходный текст
Список pgsql-general
Hello Guys,
I need to create a postgres 7.3 (done that, its bundled with an app I
have to extend).
Now I need to create 2 tables one a table of events. usual mix of
column types, with varchar as primary key.

However when I get 3 events in with specific characteristics   I need
to create a summary event saying " 3 events of type X received).

So I need I guess to create a foreign key in the table with the 3
events in, pointing to the primary key in the summary event table.
But normally the parent is created 1st then the children - so I am
confused now about what constraints to put where so i can ensure
things make sense.
any help appreciated..

Carlos


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

Предыдущее
От: "Andrus"
Дата:
Сообщение: How to get schema name which violates fk constraint
Следующее
От: "Dave Fry"
Дата:
Сообщение: statement_timeout by host?