Skip site navigation (1) Skip section navigation (2)

Re: Unable To Modify Table

From: Steve Crawford <scrawford(at)pinpointresearch(dot)com>
To: Carlos Mennens <carlos(dot)mennens(at)gmail(dot)com>
Cc: "PostgreSQL (SQL)" <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Unable To Modify Table
Date: 2012-01-12 16:53:47
Message-ID: 4F0F101B.5050105@pinpointresearch.com (view raw or flat)
Thread:
Lists: pgsql-sql
On 01/12/2012 08:42 AM, Carlos Mennens wrote:
> I seem to have an issue where I can't modify a table due to another
> tables foreign key association:
>
> ...
>
> How does one accomplish my goal? Is this difficult to change or once
> that foreign key is created, are you stuck with that particular
> constraint?
>

Try updating the values in both tables within a transaction with 
constraints set to deferred:
http://www.postgresql.org/docs/current/static/sql-set-constraints.html

Cheers,
Steve

In response to

pgsql-sql by date

Next:From: Adrian KlaverDate: 2012-01-12 16:54:41
Subject: Re: Unable To Modify Table
Previous:From: Carlos MennensDate: 2012-01-12 16:42:59
Subject: Unable To Modify Table

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group