Some thing like instead of
static int comparedict(const void *a, const void *b) { return ((DictInfo *) a)->dict_id - ((DictInfo *) b)->dict_id; }
now used
static int comparedict(const void *a, const void *b) { if ( ((DictInfo *) a)->dict_id == ((DictInfo *) b)->dict_id ) return 0; return ( ((DictInfo *) a)->dict_id < ((DictInfo *) b)->dict_id ) ? -1 : 1; }
It works for small dict_id ( dict_id has type Oid ), but it was errnous for dict_id>2^31.
Christopher Kings-Lynne wrote:
Hi Teodor,
What exactly did you fix here?
Chris
Teodor Sigaev wrote:
I found several unpleasant blot in comparing functions and commit changes to 7.4, 8.0 and head. Pls check (it need just to recompile .so file)
Christopher Kings-Lynne wrote:
It's cached. This select should run only one time per connection for each used dictionary. If its'not then it's a bug. I'll check it.
It probably is then - although I do use a persistent connection pool, but I wouldn't have thought that'd use more than a new connection every once in a while?
Chris
-- Teodor Sigaev E-mail: [EMAIL PROTECTED] WWW: http://www.sigaev.ru/
---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly