Re: [HACKERS] Finding primary keys in a table - Mailing list pgsql-hackers

From Thomas G. Lockhart
Subject Re: [HACKERS] Finding primary keys in a table
Date
Msg-id 35B3F1C1.CE513FB8@alumni.caltech.edu
Whole thread Raw
In response to Re: [HACKERS] Finding primary keys in a table  (darcy@druid.net (D'Arcy J.M. Cain))
Responses Re: [HACKERS] Finding primary keys in a table
List pgsql-hackers
> > Because we just create a unique index on a PRIMARY specification, I
> > think any unique index on a field shows it as primary.
> Hmm.  Any chance we can somehow flag it as well?  Perhaps a new bool
> field in pg_index the next time we do a dump & reload release?  I
> assume we will need it eventually anyway.

I'm not sure I understand all the issues, but if we can avoid
distinctions between different indices that would be A Good Thing. Since
multiple unique indices are allowed, what would be the extra
functionality of having one designated "primary"? Is it an arbitrary
SQL92-ism which fits with older databases, or something which enables
new and interesting stuff?

                      - Tom

pgsql-hackers by date:

Previous
From: The Hermit Hacker
Date:
Subject: Re: [HACKERS] cvs and empty directories
Next
From: The Hermit Hacker
Date:
Subject: Re: [HACKERS] cidr