Re: one to many

From: Ben <bench(at)silentmedia(dot)com>
To: Dennis Gearon <gearond(at)fireserve(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: one to many
Date: 2004-05-16 16:50:13
Message-ID: 1A1C9DF1-A759-11D8-9907-000A95BF2A8C@silentmedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

So, you're looking for something like "referenced by" instead of the
SQL-standard "references"?

Seems like you could always whip up a stored procedure....

On May 16, 2004, at 9:27 AM, Dennis Gearon wrote:

> CC me please.
>
> How do I set up a one to many relationship in Postgres, (any DB for
> that matter.)
>
> I.E., if a delete or update of a child table causes a row in the
> parent table to no longer refer to any rows in the child table, to
> either cause Postgres to error out or delete the parent? I can see it
> does it for when a parent is upudated or deleted.
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if
> your
> joining column's datatypes do not match

In response to

  • one to many at 2004-05-16 16:27:58 from Dennis Gearon

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2004-05-16 17:04:10 Re: one to many
Previous Message Dennis Gearon 2004-05-16 16:27:58 one to many