pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
table constraints vs column
2+ messages / 2 participants
[nested] [flat]

* table constraints vs column
@ 2003-09-26 12:35 Jodi Kanter <jkanter@virginia.edu>
  2003-09-26 13:57 ` Re: table constraints vs column Bruno Wolff III <bruno@wolff.to>
  0 siblings, 1 reply; 2+ messages in thread

From: Jodi Kanter @ 2003-09-26 12:35 UTC (permalink / raw)
  To: pgsql-admin

Is there any argument to support using table constraints over column 
constraints in a situation where there are no PKs or FK references that 
are composed of more than one column?
Is the automatic PK index generated on for table constraints or for either?
Jodi
-- 

_______________________________
Jodi L Kanter
BioInformatics Database Administrator
University of Virginia
(434) 924-2846
jkanter@virginia.edu <mailto:jkanter@virginia.edu>

 

 

 

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

* Re: table constraints vs column
  2003-09-26 12:35 table constraints vs column Jodi Kanter <jkanter@virginia.edu>
@ 2003-09-26 13:57 ` Bruno Wolff III <bruno@wolff.to>
  0 siblings, 0 replies; 2+ messages in thread

From: Bruno Wolff III @ 2003-09-26 13:57 UTC (permalink / raw)
  To: Jodi Kanter <jkanter@virginia.edu>; +Cc: pgsql-admin

On Fri, Sep 26, 2003 at 08:35:54 -0400,
  Jodi Kanter <jkanter@virginia.edu> wrote:
> Is there any argument to support using table constraints over column 
> constraints in a situation where there are no PKs or FK references that 
> are composed of more than one column?

Functionally they should be the same, so I think it is more of a style
issue.

> Is the automatic PK index generated on for table constraints or for either?
> Jodi

Foreign key references do not create indexes. There already needs to be
an existing unique index (primary key will generate a unique index) on
the table being referenced or the constraint creation will fail. Optionally
you may also want to create an index on the referencing columns if you will
be doing lots of deletes (and I think updates before 7.4) on the referenced
table.



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


end of thread, other threads:[~2003-09-26 13:57 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-09-26 12:35 table constraints vs column Jodi Kanter <jkanter@virginia.edu>
2003-09-26 13:57 ` Bruno Wolff III <bruno@wolff.to>

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