Foreign key to base table with rows in inherited tables

Поиск
Список
Период
Сортировка
Искать
От
mikael.kjellstrom@_no_spam_flygtaxi.se (Mikael Kjellström)
Тема
Foreign key to base table with rows in inherited tables
Дата
Msg-id
Xns90B769BEA7C30mikaelkjellstromnosp@206.221.255.129
Список
Дерево обсуждения
Foreign key to base table with rows in inherited tables mikael.kjellstrom@_no_spam_flygtaxi.se (Mikael Kjellström)
Re: Foreign key to base table with rows in inherited tables Stephan Szabo <sszabo@megazone23.bigpanda.com>
I've declared a foreign key in table FileId referencing the primary key in 
Datafile. Datafile in itself does'nt have any rows, but Reservationfile, 
inheriting from Datafile has.

I can't insert a row in FileId because no row is found in Datafile: this is 
not what I expected.

I've tried suffixing Datafile with an asterisk (even though that shouldn't 
be necessary in 7.1), but that's not valid syntax.

I'm running 7.1.release4 on Debian Woody.

Table definitions for clarity:

-- Has no rows of its own
declare Datafile ( datafileNr    	not null    	primary key
);
-- This one has rows
declare Reservationfile (
) 
inherits(Datafile)
;
declare FileId ( datafileNr    	    	not null   references Datafile
);

В списке pgsql-sql по дате отправления
От: Hans-Jürgen Schönig
Дата:
Сообщение: Re: Distinct Values
От: Andrzej Roszkowski
Дата:
Сообщение: PL/PGSQL
FAQ