Re: Unique or Primary Key?

From: Bruce Richardson <pgsql(at)itsbruce(dot)uklinux(dot)net>
To: pgsql-general(at)postgresql(dot)org, GH <grasshacker(at)over-yonder(dot)net>
Subject: Re: Unique or Primary Key?
Date: 2001-05-03 17:00:47
Message-ID: 20010503.17004700@usb.cafod
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On 5/3/01, 2:29:09 AM, GH <grasshacker(at)over-yonder(dot)net> wrote regarding
Re: [GENERAL] Unique or Primary Key?:

> Just to expand on Eric's response, a Primary Key directive creates a
> unique not null column, whereas a unique column can be null. In this
> instance, your columns are already not null, so, as Eric responded, it
is
> basically the same thing.

OK. I was just worried that there might be some more subtle issues
regarding query/index optimisation.

Besides, I couldn't see much use in creating it as a primary key. How
would I ever reference it from another table?

--

Bruce

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Christian Marschalek 2001-05-03 17:28:46 RE: Starting the Server at Boot
Previous Message Martín Marqués 2001-05-03 16:56:49 date problem