Reference to Inherited Table

From: Thorsten Haude <postgresql(at)thorstenhau(dot)de>
To: PostgreSQL Novice ML <pgsql-novice(at)postgresql(dot)org>
Subject: Reference to Inherited Table
Date: 2002-03-23 12:37:51
Message-ID: 20020323123751.GA923@eumel.yoo.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi,

I want to reference an inherited table:
- - - Schnipp - - -
create table parent
(
id serial,
primary key(id)
);

create table child
(
thing integer
) inherits (parent);

create table third
(
stuff integer references child
);
- - - Schnapp - - -
But get an error:
ERROR: PRIMARY KEY for referenced table "child" not found

Is there a way to do it or do I have to reference parent?

tia,
Thorsten
--
Auch Hunger ist Krieg.
- Willy Brandt

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Richard A Lough 2002-03-23 15:40:32 Re: Estimating Database Disk Space
Previous Message John Taylor 2002-03-22 19:41:58 Re: Visio ODBC winnt Linux question