Re: Alias "all fields"? - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: Alias "all fields"?
Date
Msg-id 20070906152741.GB8709@alvh.no-ip.org
Whole thread Raw
In response to Re: Alias "all fields"?  (Franz.Rasper@izb.de)
Responses Re: Alias "all fields"?
List pgsql-general
Franz.Rasper@izb.de wrote:
>
> > Make the table:
>
> > id | year | value
> > ---+------+------
> > 1  | 1970 |    23
> > 1  | 1971 |    25
> > 1  | 1972 |    28
> >  ...
> > 2  | 1972 |     5
> > 3  | 1971 |    94
> > 3  | 1972 |   102
>
> > primary key: (id,year)
> > value not null
> > and be ready.
> >the import/update reasons are pretty easily solved
> >that way too.
>
> then your primary key  will consists of two fields.
> I prefer the primary keys with one field only.

Is there any reason for that preference?

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

pgsql-general by date:

Previous
From: Siah
Date:
Subject: fillfactor Question
Next
From: "Webb Sprague"
Date:
Subject: Re: Do AGGREGATES consistently use sort order?