Skip site navigation (1) Skip section navigation (2)

Re: Warning on contrib/tsearch2

From: Teodor Sigaev <teodor(at)sigaev(dot)ru>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Neil Conway <neilc(at)samurai(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Warning on contrib/tsearch2
Date: 2007-03-29 16:11:50
Message-ID: 460BE546.70304@sigaev.ru (view raw or flat)
Thread:
Lists: pgsql-hackers
> 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: teodor(at)sigaev(dot)ru
                                                    WWW: http://www.sigaev.ru/

In response to

pgsql-hackers by date

Next:From: Teodor SigaevDate: 2007-03-29 16:21:38
Subject: tsearch_core patch for inclusion
Previous:From: Tom LaneDate: 2007-03-29 16:05:49
Subject: Re: Modifying TOAST thresholds

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group