From: Leif B. Kristensen <leif@solumslekt.org>
To: pgsql-sql@postgresql.org
Subject: Re: Strange bug
Date: Tue, 29 Nov 2005 17:01:26 +0100
Message-ID: <200511291701.26148.leif@solumslekt.org> (raw)
In-Reply-To: <200511291552.53024.leif@solumslekt.org>
References: <200511291531.30441.leif@solumslekt.org>
<6965.1133275062@sss.pgh.pa.us>
<200511291552.53024.leif@solumslekt.org>
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
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: leif@solumslekt.org
Subject: Re: Strange bug
In-Reply-To: <200511291701.26148.leif@solumslekt.org>
* 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