Search Postgresql Archives

create parent after children

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux