469,648 Members | 1,168 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,648 developers. It's quick & easy.

phppgadmin, pkey's and indexes

CSN
In phppgadmin, primary keys are added/shown under
"constraints". Does creating a primary key
automatically create an index? No indexes are listed
under phppgadmin's indexes page, but "\d table" in
psql shows indexes for primary keys.

__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 12 '05 #1
3 4211
On Sun, Dec 28, 2003 at 10:42:32PM -0800, CSN wrote:
In phppgadmin, primary keys are added/shown under
"constraints". Does creating a primary key
automatically create an index? No indexes are listed
under phppgadmin's indexes page, but "\d table" in
psql shows indexes for primary keys.


From the documentation for CREATE TABLE:

"PostgreSQL automatically creates an index for each unique constraint
and primary key constraint to enforce the uniqueness. Thus, it is not
necessary to create an explicit index for primary key columns."

http://www.postgresql.org/docs/curre...eatetable.html

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 12 '05 #2
CSN <co*******************@yahoo.com> writes:
Does creating a primary key
automatically create an index?


Yup.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 12 '05 #3
CSN

--- Tom Lane wrote:
Does creating a primary key
automatically create an index?
Yup.


BTREE's only?

CSN

__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by 7 | last post: by
2 posts views Thread by eClaire | last post: by
2 posts views Thread by Eric | last post: by
3 posts views Thread by Chris Green | last post: by
2 posts views Thread by John Oliver | last post: by
3 posts views Thread by Dan99 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.