Re: NOT DEFERRABLE as default, why and how to manage it. - Mailing list pgsql-general

From Ivan Sergio Borgonovo
Subject Re: NOT DEFERRABLE as default, why and how to manage it.
Date
Msg-id 20080819104911.5dc54a0b@dawn.webthatworks.it
Whole thread Raw
In response to Re: NOT DEFERRABLE as default, why and how to manage it.  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: NOT DEFERRABLE as default, why and how to manage it.
List pgsql-general
On Tue, 19 Aug 2008 11:20:08 +0300
Peter Eisentraut <peter_e@gmx.net> wrote:

> Am Tuesday, 19. August 2008 schrieb Ivan Sergio Borgonovo:
> > I just learnt that NOT DEFERRABLE is default.
>
> > Is it mandated by SQL standard?
>
> Yes.

Is there any reason they put it that way in the standard other than
the mantra "stricter is better"?

> > Is there any shortcut if I've to change to deferrable most of my
> > constraints?
>
> Probably not, short of writing a little script.

Reading the wiki an alter constraint is in the TODO.

What about a:
update pg_constraint set deeferrable=true where contype='f' and
confupdtype<>'r' and confdeltype<>'r' ...

BTW looking at pg_constraint and
http://www.alberton.info/postgresql_meta_info.html
was inspirational.

What are the general rules about modifying the system tables?
Where can I find what can be done and when and what can't be done?

> > Other than pgfoundry is there any other recipe repository where
> > to look for refactoring tools for postgresql?

> The wiki, I'd say.

Thanks

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


pgsql-general by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: NOT DEFERRABLE as default, why and how to manage it.
Next
From: Klint Gore
Date:
Subject: 8.3.3 win32 crashing