| From: | Darren Ferguson <darren(at)crystalballinc(dot)com> |
|---|---|
| To: | Erwin Ambrosch <erwin(dot)ambrosch(at)ebutec(dot)com> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: PRIMARY KEY and UNIQUE |
| Date: | 2002-02-21 18:59:58 |
| Message-ID: | Pine.LNX.4.10.10202211359080.17552-100000@thread.crystalballinc.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
No the unique constraint is not necessary because a primary key by
definition should be able to be used to uniquly define a row tuple
whatever it is called
Darren Ferguson
On Thu, 14 Feb 2002, Erwin Ambrosch wrote:
> Hi,
>
> I have a such a table.
>
> CREATE TABLE int_article (
> name VARCHAR(12) UNIQUE
> headline TEXT,
> summary TEXT,
> main TEXT,
> footer TEXT,
> PRIMARY KEY (name)
> );
>
> Is the UNIQUE constraint neccessary, because if have specified the column
> name to be the primary key.
>
> Thanks in advance
> Erwin
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Gurunandan R. Bhat | 2002-02-21 19:04:57 | Re: Time difference changed in 7.2 (3rd time post and |
| Previous Message | Jean-Michel POURE | 2002-02-21 18:42:12 | fmgr_info: function 20071: cache lookup failed |