From: Steve Crawford <scrawford@pinpointresearch.com>
To: Carlos Mennens <carlos.mennens@gmail.com>
Cc: PostgreSQL (SQL) <pgsql-sql@postgresql.org>
Subject: Re: Unable To Modify Table
Date: Thu, 12 Jan 2012 08:53:47 -0800
Message-ID: <4F0F101B.5050105@pinpointresearch.com> (raw)
In-Reply-To: <CAAQLLO70j_j-nz7sZmXbcKT7QRmuf6oQRsCT_N5=+8UC7NFp1A@mail.gmail.com>
References: <CAAQLLO70j_j-nz7sZmXbcKT7QRmuf6oQRsCT_N5=+8UC7NFp1A@mail.gmail.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: scrawford@pinpointresearch.com, carlos.mennens@gmail.com
Subject: Re: Unable To Modify Table
In-Reply-To: <4F0F101B.5050105@pinpointresearch.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox