auto-incrementing once more

From: Marcin Grondecki <ojciec(at)mtl(dot)pl>
To: pgsql-general(at)postgreSQL(dot)org
Subject: auto-incrementing once more
Date: 1998-08-05 15:22:47
Message-ID: 3.0.5.32.19980805172247.007b6960@mtl.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,
I'd like to use auto-incrementing possibilities of pgsql
in more sofisticated way then auto-increment one independent
column.
i.e. i've following structure:
client_id int4
id int4
etc....
and then, inserting records with the same client_id i'd
like pgsql to autoincrement id - independently for
each client_id (two-dimensional index).
Is there any way to do it?
Maybe more - when inserting record with empty client_id
(and id), pgsql should create next client_id.
Etc... :)
TIA

Marcin Grondecki
mailto:ojciec(at)mtl(dot)pl

*** Programy powinno sie sprzedawac lacznie z ich tworcami

Browse pgsql-general by date

  From Date Subject
Next Message Thornton Prime 1998-08-05 17:17:14 The SoundEx Contrib Example
Previous Message The Hermit Hacker 1998-08-05 14:55:14 Re: [GENERAL] web-site and redirecting to mirror