Re: Design database - Mailing list pgsql-admin

From David G. Johnston
Subject Re: Design database
Date
Msg-id CAKFQuwYjH8proEfMJ7jnFo9k_6tABgOG=ib5TeEnTSjGMQmPqQ@mail.gmail.com
Whole thread Raw
In response to Design database  (Mai Peng <maily.peng@webedia-group.com>)
Responses Re: Design database  (hubert depesz lubaczewski <depesz@depesz.com>)
List pgsql-admin
On Wed, Feb 3, 2021 at 8:23 AM Mai Peng <maily.peng@webedia-group.com> wrote:
Hello,

I’ve got a table name publication, and another table named publication_item.
Each publication_item is linked to a publication by publication_id.
How could I add a constraint that check each publication has one or more publication_item when a tuple is inserted ?
I don’t want to store items in the same table as publication because we could have 1-> n items.


David J.


pgsql-admin by date:

Previous
From: Raj kumar
Date:
Subject: Sharding in Postgres
Next
From: Yambu
Date:
Subject: pg_wal keeps growing