Re: [GENERAL] Processing a work queue

2007-04-28 Thread Lexington Luthor
Steve Crawford wrote: begin; select item-id, item-info from the-queue where available order by priority limit 1 for update; update the-queue set status = 'assigned' where item-id = previously-selected-item-id; commit; I do something similar in one of my apps: BEGIN; up

Re: [GENERAL] Automatic locale detection?

2006-10-09 Thread Lexington Luthor
Matthew Peter wrote: Is it possible to automatically detect the language encoding of incoming data? For instance if Japanese is used, is there a way to know it is Japanese from a bit in the charset, a dictionary-based evaluation or otherwise? Have a look at http://www.mozilla.org/projects/i

Re: [GENERAL] Definition of return types for own functions?

2006-09-28 Thread Lexington Luthor
[EMAIL PROTECTED] wrote: Is it possible to define a complex return type like a record in a function without having some table around with the needed structure of the return values? Sure, you just have to specify the columns at select time instead (and this is easy enough to wrap inside a view)

Re: [GENERAL] Solution for rolling back many transactions?

2006-09-27 Thread Lexington Luthor
Phillip Tornroth wrote: In case it's useful information, the test database is pretty small... Maybe 15 or 20 megs. The unit tests are individually pretty small.. Less than 100 inserts each, for sure... So there's not that much to 'roll back'.. As far as using transactions to undo the state of t

Re: [GENERAL] Generating unique session ids

2006-07-27 Thread Lexington Luthor
Tomasz Ostrowski wrote: On Wed, 26 Jul 2006, Tom Lane wrote: "Antimon" <[EMAIL PROTECTED]> writes: As the id field is primary key, it should generate a unique violation if duplicate ids created, might be seen rarely but wanted to solve it anyway. Why don't you just use a serial generator? I

[GENERAL] Isolated transactions?

2005-10-04 Thread Lexington Luthor
Hi, I have a number of large tables in a schema all of which are related by foreign keys. Now, what I would like to be able to do is run some long-running queries (mostly selects, but also some updates and inserts into the tables), to generate some reports which will eventually be rolled-bac

[GENERAL] Unicode limits

2005-09-04 Thread Lexington Luthor
Hi, I noticed that PG 8.1 beta has been released. With 8.0 I have problems with code points above U+. Can someone please tell me whether the Unicode problems in 8.0.x have been fixed in this version? If so, is the beta version stable enough to use yet? LL ---(en