Search Postgresql Archives

Re: Alias "all fields"?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Franz.Rasper@xxxxxx 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

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux