code: random backend code should not, not, not be using fopen() directly. If you lose control to an elog, which is certainly possible seeing that this loop calls into the utils/mb subsystem, you'll leak the file descriptor. Use AllocateFile/FreeFile instead of fopen/fclose.
Will soon in tsearch_core patch
I find the direct use of malloc/realloc/strdup to be poor style as well --- backend code that is not using palloc needs to have *very* good reason to do so, and I see none here.
Already in tsearch_core patch. -- Teodor Sigaev E-mail: [EMAIL PROTECTED] WWW: http://www.sigaev.ru/ ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match