From pgimpelj@sympatico.ca Thu May 20 18:43:24 2004 X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id EAAB6D1B289 for ; Thu, 20 May 2004 15:43:24 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 68327-08 for ; Thu, 20 May 2004 15:43:04 -0300 (ADT) Received: from tomts36-srv.bellnexxia.net (tomts36-srv.bellnexxia.net [209.226.175.93]) by svr1.postgresql.org (Postfix) with ESMTP id E5679D1B1BD for ; Thu, 20 May 2004 15:43:02 -0300 (ADT) Received: from zoom ([206.172.136.50]) by tomts36-srv.bellnexxia.net (InterMail vM.5.01.06.05 201-253-122-130-105-20030824) with SMTP id <20040520184302.TQBD11251.tomts36-srv.bellnexxia.net@zoom> for ; Thu, 20 May 2004 14:43:02 -0400 Message-ID: <004801c43e98$db450060$3410fea9@zoom> From: "Paul Gimpelj" To: Subject: v7.2 triggers and foreign keys Date: Thu, 20 May 2004 14:32:49 -0400 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0045_01C43E77.532FFA20" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.6 tagged_above=0.0 required=5.0 tests=HTML_40_50, HTML_MESSAGE, RCVD_IN_RFCI X-Spam-Level: X-Archive-Number: 200405/182 X-Sequence-Number: 17896 This is a multi-part message in MIME format. ------=_NextPart_000_0045_01C43E77.532FFA20 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, I have two tables a and b.; b references a. I used pgaccess to create tables. and psql to create the triggers and foreign keys. a has sequential id, and = primary key same column. As constraints they were implicit, and cascade was off. On delete of the of a b row, postgres also deleted the a table row. I then created a2 and b2 with action queries. and the delete acted as expec= ted. Where am i going wrong with this? Do I need to install 7.4? Also, created tables a3 and b3, with sequential ids using pgaccess same as = a and b, and the seq id's don't increment with these tables. Thanks. paul ------=_NextPart_000_0045_01C43E77.532FFA20 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi,
 
I have two tables a and b.; b references= =20 a.
I used pgaccess to create tables.
and psql to create the triggers and foreig= n keys. a=20 has sequential id, and primary key same column.
 
As constraints they were implicit, and cas= cade was=20 off.
 
On delete of the of a b row, postgres also= deleted=20 the a table row.
 
I then created a2 and b2 with action queri= es. and=20 the delete acted as expected.
 
Where am i going wrong with this?
Do I need to install 7.4?
 
Also, created tables a3 and b3, with seque= ntial ids=20 using pgaccess same as a and b, and the seq id's don't increment with these= =20 tables.
 
Thanks.
paul
 
------=_NextPart_000_0045_01C43E77.532FFA20-- From dev@archonet.com Fri May 21 08:11:58 2004 X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 59B46D1B289 for ; Fri, 21 May 2004 05:11:58 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 38049-08 for ; Fri, 21 May 2004 05:11:40 -0300 (ADT) Received: from anchor-post-37.mail.demon.net (anchor-post-36.mail.demon.net [194.217.242.86]) by svr1.postgresql.org (Postfix) with ESMTP id D5C81D1B203 for ; Fri, 21 May 2004 05:11:37 -0300 (ADT) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-37.mail.demon.net with esmtp (Exim 3.35 #1) id 1BR57y-000Fhh-0b; Fri, 21 May 2004 09:11:38 +0100 Received: from [192.168.1.17] (client17.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id 535C615D8D; Fri, 21 May 2004 09:11:37 +0100 (BST) Message-ID: <40ADB9B8.3000600@archonet.com> Date: Fri, 21 May 2004 09:11:36 +0100 From: Richard Huxton User-Agent: Mozilla Thunderbird 0.6 (X11/20040502) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Paul Gimpelj Cc: pgsql-sql@postgresql.org Subject: Re: v7.2 triggers and foreign keys References: <004801c43e98$db450060$3410fea9@zoom> In-Reply-To: <004801c43e98$db450060$3410fea9@zoom> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200405/186 X-Sequence-Number: 17900 Paul Gimpelj wrote: > Hi, > > I have two tables a and b.; b references a. > I used pgaccess to create tables. > and psql to create the triggers and foreign keys. a has sequential id, and primary key same column. > > As constraints they were implicit, and cascade was off. > > On delete of the of a b row, postgres also deleted the a table row. You'll need to show the table definitions (with foreign keys etc) and also trigger definitions (use "\d table_a" in psql or "pg_dump --schema-only -t tablename") -- Richard Huxton Archonet Ltd