pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Chris Hoover <revoohc@gmail.com>
To: Hemapriya <priyam_1121@yahoo.com>
To: pgsql-admin@postgresql.org
Subject: Re: Help converting constraint triggers
Date: Wed, 3 Aug 2005 12:24:14 -0400
Message-ID: <1d219a6f05080309243afb2e00@mail.gmail.com> (raw)
In-Reply-To: <20050803154814.33480.qmail@web34204.mail.mud.yahoo.com>
References: <1d219a6f05080308271131c8d9@mail.gmail.com>
	<20050803154814.33480.qmail@web34204.mail.mud.yahoo.com>

What version of pgadmin are you using?  I looked in pgadmin3 and it
does not show the constraint triggers.

On 8/3/05, Hemapriya <priyam_1121@yahoo.com> wrote:
> 
> pgadmin will list all the trigger functions defined
> in each schema. it is a freeware.
> 
> --- Chris Hoover <revoohc@gmail.com> wrote:
> 
> > I need some help understanding how to convert
> > constraint triggers to
> > normal foreign keys.  I have several of them in my
> > database that a
> > previous dba created.  Since they don't show up in
> > most PostgreSQL
> > tools, they are becoming a real pain to deal with.
> >
> > Here is an example of on of the constraint triggers:
> > CREATE CONSTRAINT TRIGGER sys_user_group_id_fkey
> >     AFTER INSERT OR UPDATE ON sys_user
> >     FROM sys_group
> >     NOT DEFERRABLE INITIALLY IMMEDIATE
> >     FOR EACH ROW
> >     EXECUTE PROCEDURE "RI_FKey_check_ins"
> > ('sys_user_group_id_fkey',
> > 'sys_user', 'sys_group', 'UNSPECIFIED', 'group_id',
> > 'group_id');
> >
> >
> > I believe this is the same as the foriegn key
> > definition,
> >
> > alter table sys_user
> >   add constraint sys_user_group_id_fkey foreign
> > key(group_id)
> >   references sys_group(group_id)
> >   not deferrrable;
> >
> > Is this correct?  If not, how would be proper
> > foreign key be defined?
> >
> > Thanks,
> >
> > Chris
> >
> > ---------------------------(end of
> > broadcast)---------------------------
> > TIP 5: don't forget to increase your free space map
> > settings
> >
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>



view thread (5+ messages)  latest in thread

Message-ID: <1d219a6f05080309243afb2e00@mail.gmail.com>
Permalink:  ../1d219a6f05080309243afb2e00@mail.gmail.com/
Also on:    postgresql.org/message-id/1d219a6f05080309243afb2e00@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: revoohc@gmail.com, priyam_1121@yahoo.com
  Subject: Re: Help converting constraint triggers
  In-Reply-To: <1d219a6f05080309243afb2e00@mail.gmail.com>
  References: <1d219a6f05080308271131c8d9@mail.gmail.com> <20050803154814.33480.qmail@web34204.mail.mud.yahoo.com> <1d219a6f05080309243afb2e00@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox