Re: Strange bug

From: "Leif B(dot) Kristensen" <leif(at)solumslekt(dot)org>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Strange bug
Date: 2005-11-29 16:01:26
Message-ID: 200511291701.26148.leif@solumslekt.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Tuesday 29 November 2005 15:52, Leif B. Kristensen wrote:
>Uh-oh. That's my first 'gotcha' in PostgreSQL.
>
>I added the following constraints:

I probably should drop both the inheritance and the citation_id
altogether, and operate with two separate tables:

CREATE TABLE relation_citations (
relation_fk INTEGER REFERENCES relations (relation_id),
source_fk INTEGER REFERENCES sources (source_id),
CONSTRAINT PRIMARY KEY (relation_fk, source_fk)
);

CREATE TABLE event_citations (
event_fk INTEGER REFERENCES events (event_id),
source_fk INTEGER REFERENCES sources (source_id),
CONSTRAINT PRIMARY KEY (event_fk, source_fk)
);

Is there an easy and non-disruptive way to do this?
--
Leif Biberg Kristensen | Registered Linux User #338009
http://solumslekt.org/ | Cruising with Gentoo/KDE

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message engineer 2005-11-29 16:01:56 'AS' in 'DELETE/UPDATE'
Previous Message Leif B. Kristensen 2005-11-29 14:57:13 Re: Strange bug