dbTalk Databases Forums  

v7.2 triggers and foreign keys

comp.databases.postgresql.sql comp.databases.postgresql.sql


Discuss v7.2 triggers and foreign keys in the comp.databases.postgresql.sql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Paul Gimpelj
 
Posts: n/a

Default v7.2 triggers and foreign keys - 05-20-2004 , 01:32 PM






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 expected.

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



Reply With Quote
  #2  
Old   
Richard Huxton
 
Posts: n/a

Default Re: v7.2 triggers and foreign keys - 05-21-2004 , 03:11 AM






Paul Gimpelj wrote:
Quote:
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

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



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.