Re: [GENERAL] auto increment within a compound key

2006-01-19 Thread Michael Fuhr
On Tue, Jan 17, 2006 at 04:33:46PM +0100, Bogdoll, Dieter wrote: > Is there any way to achieve the same result in Postgresql as the MySQL > AUTO_INCREMENT does? Not without an adverse impact on performance. PostgreSQL's serial type is just a notational convenience for an integer column that takes

[GENERAL] auto increment within a compound key

2006-01-19 Thread Bogdoll, Dieter
Title: auto increment within a compound key Hi, I want to create a compound primary key. The elements of this primary key should be the fields called nb (int) and d (double). nb should be default and autoincremented, so that the following four inserts insert into mytable (ts) values ( 1