Skip site navigation (1) Skip section navigation (2)

check_foriegn_key TO FOREIGN KEY.

From: Luke Tudor - RSG <ltt(at)pml(dot)ac(dot)uk>
To: pgsql-novice(at)postgresql(dot)org
Subject: check_foriegn_key TO FOREIGN KEY.
Date: 2001-03-19 10:44:36
Message-ID: 3AB5E314.30B26A74@unixmail.npm.ac.uk (view raw or flat)
Thread:
Lists: pgsql-novice
Dear Postgres Team,

I am still working away at fixing my database. I have decided to drop of
out of date check_foriegn_key function, and
move to the new FOREIGN KEY.

I am having a little trouble converting triggers to make use of the new
function, and wondered if someone could give me an example.

Taking the trigger;

CREATE TRIGGER check_user
BEFORE DELETE ON genUser
   FOR EACH ROW EXECUTE PROCEDURE
   check_foriegn_key(1,'cascade','userid','webuser','userid');

how would I correct it to make use of the new Foreign Key function?

I understand that this may be a simple question, but converting a non
backedup database when still learning Sql can be a scary thing!!!

Any help appreciated.

Best Regards,
Luke.

pgsql-novice by date

Next:From: Bill HowellDate: 2001-03-19 15:18:28
Subject: Sorry, too many clients already
Previous:From: Vijay DevalDate: 2001-03-19 03:34:12
Subject: Re: Help with a query, please

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group