Skip site navigation (1) Skip section navigation (2)

Re: Reference to Inherited Table

From: Chris <csmith(at)squiz(dot)net>
To: Thorsten Haude <postgresql(at)thorstenhau(dot)de>,PostgreSQL Novice ML <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Reference to Inherited Table
Date: 2002-03-24 22:52:05
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice

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

create table third(
stuff integer references child(thing)

You could do what you were trying to do if in the child table you have a 
field called 'stuff', but since you don't, you have to reference it 

      Chris Smith

In response to

pgsql-novice by date

Next:From: Masakazu IchimuraDate: 2002-03-25 09:16:35
Subject: Can I see a content of function
Previous:From: Tom LaneDate: 2002-03-23 17:08:51
Subject: Re: Estimating Database Disk Space

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group