Re: Alias "all fields"?

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Franz(dot)Rasper(at)izb(dot)de
Cc: tino(at)wildenhain(dot)de, stefan(dot)schwarzer(at)grid(dot)unep(dot)ch, pgsql-general(at)postgresql(dot)org
Subject: Re: Alias "all fields"?
Date: 2007-09-06 15:27:41
Message-ID: 20070906152741.GB8709@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Franz(dot)Rasper(at)izb(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2007-09-06 15:29:56 Re: Need suggestion on how best to update 3 million rows
Previous Message Eric Pailleau 2007-09-06 15:22:33 archive_command with an environnement variable ?