On Mon, 18 Aug 2008 15:16:01 -0400
Tom Lane <[EMAIL PROTECTED]> wrote:

> Ivan Sergio Borgonovo <[EMAIL PROTECTED]> writes:
> > I'm not sure what's really happening but why apparently the
> > delete statements get executed before the 2 inserts even if
> > constraints are deferred?
> 
> You didn't mark the FK constraints as deferrable --- I'm pretty
> sure the default is NOT DEFERRABLE.

My fault. I don't know how did I succeeded to read that the default
was DEFERRABLE while it is clearly stated it is not.

I can't see a direct way to add DEFERRABLE to an already existing
constraint. Is dropping and adding the only path?

> > Why does it take so long?
> 
> Indexes on the FK columns would probably help.

There is one actually. I'll post another email with a more sensible
subject to ask more advices on this, if google doesn't help me first.

Thanks.

-- 
Ivan Sergio Borgonovo
http://www.webthatworks.it


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to