Re: Alias "all fields"?

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Alias "all fields"?
Дата
Msg-id 20070906152741.GB8709@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: Alias "all fields"?  (Franz.Rasper@izb.de)
Ответы Re: Alias "all fields"?  (Stefan Schwarzer <stefan.schwarzer@grid.unep.ch>)
Список 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 по дате отправления:

Предыдущее
От: Siah
Дата:
Сообщение: fillfactor Question
Следующее
От: "Webb Sprague"
Дата:
Сообщение: Re: Do AGGREGATES consistently use sort order?