Search Postgresql Archives

Re: one to many

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

 



Peter Eisentraut wrote:

Dennis Gearon wrote:


How do I set up a one to many relationship in Postgres, (any DB for
that matter.)



Read about foreign keys:


http://www.postgresql.org/docs/7.4/static/ddl-constraints.html#DDL-CONSTRAINTS-FK



That only takes care of if the PARENT is deleted/updated, if I read it right. I'm trying to take care of the case where the CHILD is deleted or updated, i.e. preserving 1-Many part of a rlationship.

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
   (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

[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