Re: Reference to Inherited Table

Поиск
Список
Период
Сортировка
От Chris
Тема Re: Reference to Inherited Table
Дата
Msg-id 5.1.0.14.0.20020325094919.027bf4e0@cooee.cybersydney.com.au
обсуждение исходный текст
Ответ на Reference to Inherited Table  (Thorsten Haude <postgresql@thorstenhau.de>)
Список pgsql-novice
Hi,

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

Try
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
specifically.


-----------------
      Chris Smith
http://www.squiz.net/


В списке pgsql-novice по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Estimating Database Disk Space
Следующее
От: Masakazu Ichimura
Дата:
Сообщение: Can I see a content of function