From: | Daniel Staal <DStaal(at)usa(dot)net> |
---|---|
To: | Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>, "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org> |
Subject: | Re: Referencing multiple primary keys from a single |
Date: | 2003-09-22 22:23:24 |
Message-ID: | 27042678.1064251404@[192.168.1.52] |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
--On Monday, September 22, 2003 15:05 -0700 Stephan Szabo
<sszabo(at)megazone(dot)bigpanda(dot)com> wrote:
> This isn't multiple primary keys, it's a single primary key with
> 3 columns.
Ah, I wasn't sure how to refer to it.
>> Then I have another table that needs to reference Table1 with a
>> foreign key. What I really want to do is:
>> Table2:
>> field1 Primary key
>> field2 references table1
>
> What are you actually trying to do here? field2 is a single column
> and you're referencing a 3 column key, so I'm not sure what behavior
> you're looking for.
Simple: I'm looking for a way to use one field in Table2 to refer to
one row in Table1. (Instead of using 3.)
I think you've actually answered my question though. The tone of the
response made me realize I was thinking like my program which
interchanges field1.T1:field2.T1:field3.T1 with other readings of the
serial number... (In other words: I'm trying to do something which
is a dumb idea in the first place. The best thing to do is not to do
it.)
Thanks for giving my brain the jolt it needed.
Daniel T. Staal
---------------------------------------------------------------
This email copyright the author. Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes. This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---------------------------------------------------------------
From | Date | Subject | |
---|---|---|---|
Next Message | Bruno Wolff III | 2003-09-22 22:33:54 | Re: Referencing multiple primary keys from a single table. |
Previous Message | Stephan Szabo | 2003-09-22 22:05:50 | Re: Referencing multiple primary keys from a single table. |