| From: | John R Pierce <pierce(at)hogranch(dot)com> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Add Foreign Keys To Table |
| Date: | 2011-07-07 20:18:32 |
| Message-ID: | 4E161498.1060303@hogranch.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On 07/07/11 1:02 PM, Rich Shepard wrote:
> On Thu, 7 Jul 2011, Alan Hodgson wrote:
>
>> create unique index index_name on table (column).
>
> Alan,
>
> This worked like a charm.
>
> Many thanks for the lesson,
>
> Rich
>
if your original table has Primary Key of (sta_type, secondary_type) I
would not expect EITHER of those fields to be unique by themselves....
Surely there can be more than one of the same sta_type with different
secondary_type's, just as there could be more than one secondary_type
with different sta_types.... if either of these fields is unique of
and by itself, it doesn't make sense to use the combined primary key.
--
john r pierce N 37, W 122
santa cruz ca mid-left coast
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Guillaume Lelarge | 2011-07-07 20:24:07 | Re: Creating temp tables inside read only transactions |
| Previous Message | Rich Shepard | 2011-07-07 20:05:40 | Re: Add Foreign Keys To Table |