Using indexes and keys - Mailing list pgsql-novice

From John Taylor
Subject Using indexes and keys
Date
Msg-id 02020816504200.05502@splash.hq.jtresponse.co.uk
Whole thread Raw
Responses Re: Using indexes and keys
List pgsql-novice
I'm a bit confused about the use of indexes with postgresql.
I've a number of questions that are probably obvious when you know
the answer, but I can't find in the documentation.

1) It seems that I can only have primary keys in postgresql,
   does this mean that keys are not the same as indexes ?

2) If I define a column as a primary key, does that mean that it will be
   indexed, so I don't nee to create an index as well ?

2a) If so - If I define two or more columns as the primary key, will they
    be indexed seperately, or do I need to index the 2nd and 3rd columns
    seperately

3) If I create an index on a column (it is not unique and so can't be a key),
   what do I need to query on - the index name or the column name ?

Thanks
JohnT


pgsql-novice by date:

Previous
From: "Joshua b. Jore"
Date:
Subject: Re: SETOF / SETS_FIXED?
Next
From: "Josh Berkus"
Date:
Subject: Re: Using indexes and keys