pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
primary key and foreign key
2+ messages / 2 participants
[nested] [flat]

* primary key and foreign key
@ 2007-07-25 17:20 Jessica Richard <rjessil@yahoo.com>
  2007-07-25 17:25 ` Re: primary key and foreign key Richard Broersma Jr <rabroersma@yahoo.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Jessica Richard @ 2007-07-25 17:20 UTC (permalink / raw)
  To: pgsql-admin

Just want to be very clear that:

1. adding a primary key will have an implicit index automatically on the column(s).

2. Adding a foreign key will NOT have an index created automatically, it only does the referencing work. If an index is needed on the F-key column, it has to be created, right?

Thanks.

       
---------------------------------
Sick sense of humor? Visit Yahoo! TV's Comedy with an Edge to see what's on, when. 

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: primary key and foreign key
  2007-07-25 17:20 primary key and foreign key Jessica Richard <rjessil@yahoo.com>
@ 2007-07-25 17:25 ` Richard Broersma Jr <rabroersma@yahoo.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Richard Broersma Jr @ 2007-07-25 17:25 UTC (permalink / raw)
  To: Jessica Richard <rjessil@yahoo.com>; pgsql-admin


--- Jessica Richard <rjessil@yahoo.com> wrote:

> Just want to be very clear that:
> 
> 1. adding a primary key will have an implicit index automatically on the column(s).
> 
> 2. Adding a foreign key will NOT have an index created automatically, it only does the
> referencing work. If an index is needed on the F-key column, it has to be created, right?

Correct.

Regards,
Richard Broersma Jr.




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2007-07-25 17:25 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-07-25 17:20 primary key and foreign key Jessica Richard <rjessil@yahoo.com>
2007-07-25 17:25 ` Richard Broersma Jr <rabroersma@yahoo.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox