Workaround or user defined type
От | Juan Jose Natera Abreu |
---|---|
Тема | Workaround or user defined type |
Дата | |
Msg-id | 01110615385701.00494@juanjose обсуждение исходный текст |
Ответы |
Re: Workaround or user defined type
Re: Workaround or user defined type Re: Workaround or user defined type |
Список | pgsql-novice |
Hello people, I am working on a trouble ticket system in Perl, usually those systems identify a ticket by a string composed of DDMMYYYY-SERIAL, (DD = day, MM= month, YYYY= year, SERIAL= a serial number for the date string). I am not sure how to generate these identifiers, in case I generate them manually i must provide a mechanism to insure the sequence, like locking the table for reading/writing, get the last value, insert the new one and then release the lock. However i think this could be a big performance killer. Any ideas? The other option I see, is creating a user defined type that will take care of keeping the sequence for me. I read the apropiate page at the programmers manual, but i think i would need more information. Any resources? Regards, Juan Jose -- fortune generated signature: Brook's Law: Adding manpower to a late software project makes it later
В списке pgsql-novice по дате отправления: