Re: Foreign keys question (performance)

From: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
To: Phoenix Kiula <phoenix(dot)kiula(at)gmail(dot)com>
Cc: Alban Hertroys <haramrae(at)gmail(dot)com>, PG-General Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Foreign keys question (performance)
Date: 2011-12-06 20:39:11
Message-ID: 4EDE7D6F.5010003@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 12/06/2011 08:45 AM, Phoenix Kiula wrote:
> On Sun, Dec 4, 2011 at 7:41 PM, Phoenix Kiula<phoenix(dot)kiula(at)gmail(dot)com> wrote:
>> On Sun, Dec 4, 2011 at 7:14 PM, Alban Hertroys<haramrae(at)gmail(dot)com> wrote:
>>> On 4 Dec 2011, at 11:19, Phoenix Kiula wrote:
>
>
> I have a problem.
>
> Here's my table designs. The problem is that if Table 1 (stores) has a
> foreign key reference from another child table (stores_registered),
> then when I update Table 1, it throws an error that referential
> intergrity is being violate because Table 2 depends on Table 1.
> However, if I update Table 2 first, it tells me that the fkey in
> Table 1 doesn't exist (of course).
>
> Any ideas? What am I missing? How do updates work in terms of CASCADE?

What is the actual error message?

>
> Thanks!
>

--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Glyn Astill 2011-12-06 20:56:28 Re: PostgreSQL DBA in SPAAAAAAAACE
Previous Message Bèrto ëd Sèra 2011-12-06 18:02:40 Re: PostgreSQL DBA in SPAAAAAAAACE