pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PFC <lists@boutiquenumerique.com>
To: orange_crush_068@hotmail.com
To: pgsql-sql@postgresql.org
Subject: Re: Unique primary index?
Date: Tue, 28 Jun 2005 19:01:07 +0200
Message-ID: <op.ss3av5both1vuj@localhost> (raw)
In-Reply-To: <1119530632.181638.4330@g49g2000cwa.googlegroups.com>
References: <1119530632.181638.4330@g49g2000cwa.googlegroups.com>


index is... an index !

UNIQUE is an index which won't allow duplicate values (except for NULLS)

PRIMARY KEY is exactly like UNIQUE NOT NULL, with the bonus that the  
database knows this column is the primary key so you can use stuff like  
NATURAL JOIN without telling which column you want to use.



>
> What are the major differences between Unique, primary index & just
> plain index?
>
> When creating tables I nominate one of these, but not sure what the
> difference is?
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend
>





view thread (5+ messages)  latest in thread

Message-ID: <op.ss3av5both1vuj@localhost>
Permalink:  ../op.ss3av5both1vuj@localhost/
Also on:    postgresql.org/message-id/op.ss3av5both1vuj@localhost

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: lists@boutiquenumerique.com, orange_crush_068@hotmail.com
  Subject: Re: Unique primary index?
  In-Reply-To: <op.ss3av5both1vuj@localhost>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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