Re: NOT DEFERRABLE as default, why and how to manage it.

From: Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it>
To:
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: NOT DEFERRABLE as default, why and how to manage it.
Date: 2008-08-19 08:49:11
Message-ID: 20080819104911.5dc54a0b@dawn.webthatworks.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 19 Aug 2008 11:20:08 +0300
Peter Eisentraut <peter_e(at)gmx(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Goboxe 2008-08-19 08:50:53 Re: PostgreSQL on Windows x64
Previous Message Peter Eisentraut 2008-08-19 08:20:08 Re: NOT DEFERRABLE as default, why and how to manage it.