pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Leif B. Kristensen <leif@solumslekt.org>
Cc: pgsql-sql@postgresql.org
Subject: Re: Strange bug
Date: Tue, 29 Nov 2005 09:37:42 -0500
Message-ID: <6965.1133275062@sss.pgh.pa.us> (raw)
In-Reply-To: <200511291531.30441.leif@solumslekt.org>
References: <200511291531.30441.leif@solumslekt.org>

"Leif B. Kristensen" <leif@solumslekt.org> writes:
> I just noticed that I accidentally got a duplicate id. My
> definitions are here:

> CREATE TABLE citations (
>     citation_id         INTEGER PRIMARY KEY,
>     source_fk           INTEGER REFERENCES sources (source_id)
> );

> CREATE TABLE relation_citations (
>     relation_fk         INTEGER REFERENCES relations (relation_id)
> ) INHERITS (citations);

relation_citations doesn't have a primary key.  See
http://www.postgresql.org/docs/8.1/static/ddl-inherit.html
particularly the "caveats" section.

			regards, tom lane



view thread (7+ messages)  latest in thread

Message-ID: <6965.1133275062@sss.pgh.pa.us>
Permalink:  ../6965.1133275062@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/6965.1133275062@sss.pgh.pa.us

 · 

reply

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: tgl@sss.pgh.pa.us, leif@solumslekt.org
  Subject: Re: Strange bug
  In-Reply-To: <6965.1133275062@sss.pgh.pa.us>

* 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