From: | Rafal Pietrak <rafal(at)zorro(dot)isa-geek(dot)com> |
---|---|
To: | Adrian Klaver <aklaver(at)comcast(dot)net> |
Cc: | pgsql-general(at)postgresql(dot)org, Alban Hertroys <alban(at)magproductions(dot)nl> |
Subject: | Re: TRIGGER BEFORE INSERT |
Date: | 2007-01-11 21:12:27 |
Message-ID: | 1168549947.4459.40.camel@zorro.isa-geek.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Perfect! Thenx!
-R
On Thu, 2007-01-11 at 12:26 -0800, Adrian Klaver wrote:
> On Thursday 11 January 2007 10:26 am, Rafal Pietrak wrote:
> > On Thu, 2007-01-11 at 15:10 +0100, Alban Hertroys wrote:
> > > Rafal Pietrak wrote:
> > > > Hi!
> > > >
> > > > I'm re-posting this message again in hope someone would have a
> look at
> > > > the case again. .. it's pending.
> > >
> > > You were given a solution; defer the foreign key constraint.
> >
> > Well. I were, but probably I'm doing something wrong with 'deferring
> the
> > trigger'. When I put:
>
> What previous posters have said is that you need to defer the FK. So
> you need
> to change your table definition from:
> CREATE TABLE test_utarg(tm timestamp not null, nic int, amount int not
> null, dnia int references test_days(id));
> to:
> CREATE TABLE test_utarg(tm timestamp not null, nic int, amount int not
> null, dnia int references test_days(id) INITIALLY DEFERRED);
> per Toms suggestion. This eliminates the need for the SET CONSTRAINTS
> DEFERRED
> statement.
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-01-11 21:16:22 | Re: [HACKERS] Checkpoint request failed on version 8.2.1. |
Previous Message | Jeanna Geier | 2007-01-11 21:09:58 | RESTORE Error |