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

Re: [HACKERS] foreign key is from different tables - what to do?

From: Cyril Samovskiy <cyril_s31(at)yahoo(dot)com>
To: Oliver Elphick <pgsql-novice(at)postgresql(dot)org>
Subject: Re: [HACKERS] foreign key is from different tables - what to do?
Date: 2002-02-21 09:39:22
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-novice
>> hi. i'm rookie in postgres, so here is my question:

OE> Therefore your question should have gone to pgsql-novice.  (Reply-To set
OE> there.)

oh, i'm sorry i didn't know that

>> i have foreign key consisting of 2 fields (a and b). a is foreign key from
>> table aaa, b is FK from table bbb. how to create table is that complex
>> foreign key consisiting of fields from different tables?
>> thank you

OE> You seem to have two foreign keys, not one.  I'm guessing that you
OE> actually have a multi-field primary key, each field of which is a
OE> foreign key to another table:

no my primary key is only one field, another one. actually i found how
to make multi-FK from different tables using ALTER TABLE stuff.
anyway thanks a lot for your support
and sorry again for disturbing you

Best regards,
Cyril Samovskiy

Do You Yahoo!?
Get your free address at

In response to


pgsql-novice by date

Next:From: Keller, SidDate: 2002-02-21 19:56:06
Subject: Logging Apache web server log information to Postgresql
Previous:From: Oliver ElphickDate: 2002-02-21 08:19:02
Subject: Re: foreign key is from different tables - what to do?

pgsql-hackers by date

Next:From: Martín MarquésDate: 2002-02-21 12:14:14
Subject: Re: MySQL/InnoDB benchmarks
Previous:From: Tatsuo IshiiDate: 2002-02-21 09:31:54
Subject: Re: UTF-8 data migration problem in Postgresql 7.2

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