Received: from postgresql.org.org (webmail.postgresql.org [216.126.85.28]) by postgresql.org (8.11.3/8.11.1) with SMTP id f56CAGE85298 for ; Wed, 6 Jun 2001 08:10:16 -0400 (EDT) (envelope-from pgsql-sql-owner@postgresql.org) Received: from news.tht.net (news.hub.org [216.126.91.242]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f52MwOE79052 for ; Sat, 2 Jun 2001 18:58:24 -0400 (EDT) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.11.1/8.11.1) id f52Me6842621 for pgsql-sql@postgresql.org; Sat, 2 Jun 2001 18:40:06 -0400 (EDT) (envelope-from news) From: Mario Bittencourt X-Newsgroups: comp.databases.postgresql.sql Subject: Tutorial : using foreign keys, retrictions etc Date: Sat, 2 Jun 2001 18:49:55 -0400 Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 30 Message-ID: <9fbq01$19jl$1@news.tht.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Complaints-To: scrappy@hub.org User-Agent: KNode/0.4 To: pgsql-sql@postgresql.org X-Archive-Number: 200106/59 X-Sequence-Number: 3272 Hi, I've decided to switch from mysql to postgresql as my database server. I do mostly web programming (who doesnt these days?) with more than a 100 sites developed (using mysql). I've read about postgresql and it's features (such as triggers, stored procedures, views) and I'd like to know if there is some tutorial/snippet of code regarding such features specially the use of foreign keys and referetial integrity. To give a more concrete example the next app I'd like to use postgresql needs this behaviour : table A id, name table B id, foo table C id, date If I change id in table A update table B to change it too (I think it's called cascade). Thanks. - RM