Re: fkey + primary key does not work in current

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: fkey + primary key does not work in current
Дата
Msg-id Pine.BSF.4.10.10010161829370.73998-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на Re: fkey + primary key does not work in current  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: fkey + primary key does not work in current  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
I believe that I sent a patch on Sep 17 for this to -patches although
I don't know if anyone saw it (it's in the archives, so I know it
went through).

Stephan Szabo
sszabo@bigpanda.com

On Mon, 16 Oct 2000, Bruce Momjian wrote:

> Has this been resolved?
>
> > On Fri, 15 Sep 2000, Tatsuo Ishii wrote:
> > 
> > > It seems that foreign key does not work in current, if specified with
> > > primary key definition. Take a look at following example(works in
> > > 7.0.2.):
> > > 
> > > test=# CREATE TABLE PKTABLE ( ptest1 int, ptest2 int, ptest3 int, ptest4 text, PRIMARY KEY(ptest1, ptest2,
ptest3));
 
> > > NOTICE:  CREATE TABLE/PRIMARY KEY will create implicit index 'pktable_pkey' for table 'pktable'
> > > CREATE
> > > test=# CREATE TABLE FKTABLE ( ftest1 int, ftest2 int, ftest3 int, ftest4 int, primary key
(ftest1,ftest2,ftest3,ftest4), CONSTRAINT constrname3 FOREIGN KEY(ftest1, ftest2, ftest3) REFERENCES PKTABLE);
 
> > > NOTICE:  CREATE TABLE/PRIMARY KEY will create implicit index 'fktable_pkey' for table 'fktable'
> > > NOTICE:  CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
> > > ERROR:  columns referenced in foreign key constraint not found.
> > 
> > Hmm, that's very strange.  I wonder which columns it think didn't exist.
> > It shouldn't be checking the pktable in that case, which would imply
> > it doesn't believe the existance of ftest1,ftest2,ftest3.  Probably
> > a stupid mistake on my part.  As soon as I clear off space to compile
> > current, I'll look.



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

Предыдущее
От: The Hermit Hacker
Дата:
Сообщение: Re: The lightbulb just went on...
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: fkey + primary key does not work in current