From: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
---|---|
To: | Chris Bitmead <chrisb(at)nimrod(dot)itg(dot)telstra(dot)com(dot)au> |
Cc: | pgsql-general(at)hub(dot)org, "pgsql-hackers(at)postgreSQL(dot)org" <pgsql-hackers(at)postgreSQL(dot)org> |
Subject: | Re: [HACKERS] Re: PRIMARY KEY & INHERITANCE (fwd) |
Date: | 2000-07-19 14:26:24 |
Message-ID: | Pine.BSF.4.10.10007190721390.65474-100000@megazone23.bigpanda.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
Of course I had to be half asleep when I wrote the second paragraph of my
response, since I totally missed he was using a serial. The rest still
applies though...
As an aside to Chris, what interactions do you expect between the OO stuff
you've been working on and foreign key references? I'm going to have to
muck around with the trigger code to move to storing oids of tables and
attributes rather than names, so I thought it might make sense to at least
think about possible future interactions.
On Tue, 18 Jul 2000, Stephan Szabo wrote:
>
> If you don't specify a set of target columns for the reference, it goes to
> the primary key of the table (if one exists). If one doesn't we error out
> as shown below. You can make the reference by saying:
> advert_id int4 not null references advert(id)
> in the definition of table work.
>
> Of course, in this case, I don't even see a primary key being defined on
> either picture or advert, so it's not really the inheritance thing unless
> he also made an index somewhere else (not using unique or primary key on
> the table).
>
> In 7.1, the ability to reference columns that are not constrained to be
> unique will probably go away, but you can also make the index on
> advert(id) to make it happy in that case.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2000-07-19 14:52:12 | Re: tcl/tk interface on Digital Unix |
Previous Message | Andrew Sullivan | 2000-07-19 13:13:55 | Re: Postgres + PHP question: username in pg_connect? |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2000-07-19 15:12:59 | Re: System tables since 7.0.0 |
Previous Message | Jan Wieck | 2000-07-19 12:49:24 | Re: Untrusted PL/Tcl? |