Search Postgresql Archives

Multiple Sequence Number for One Column p.2

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

 



Hello

I've met exactly the same problem as described here http://www.postgresql.org/message-id/95862fdc-eb2e-4533-8331-d49775b0ef8f@xxxxxxxxxxxxxxxxxxxxxxxxxxx . For now, I use the same solution that was presented in the response http://www.postgresql.org/message-id/077DA5F9-F783-4388-BF19-42E582DC89EE@xxxxxxxxx .

In my case, I have a composite key composed of session ID and object ID. Session ID is a unique value. I'd like to have a separate auto incremental key for each session ID value. Therefore, I create a sequence for each session ID. The problem is that once the session has ended there won't be new values with its session ID, so, we have to clear obsolete sequences related to this ID from time to time.

It's said in the last message that there are other solutions. It would be helpful for me to know the others if they exist in terms of PostgreSQL.

Thanks in advance,
Alexander Aleksiyants.


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[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