Re: pg_dump vs malloc

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: pg_dump vs malloc
Дата
Msg-id 201110141911.p9EJBOL28989@momjian.us
обсуждение исходный текст
Ответ на Re: pg_dump vs malloc  (Magnus Hagander <magnus@hagander.net>)
Ответы Re: pg_dump vs malloc
Список pgsql-hackers
Magnus Hagander wrote:
> On Wed, Jun 22, 2011 at 17:48, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > Magnus Hagander <magnus@hagander.net> writes:
> >> Something along the line of this?
> >
> > I think this is a seriously, seriously bad idea:
> >
> >> +#define strdup(x) pg_strdup(x)
> >> +#define malloc(x) pg_malloc(x)
> >> +#define calloc(x,y) pg_calloc(x, y)
> >> +#define realloc(x,y) pg_realloc(x, y)
> >
> > as it will render the code unreadable to people expecting the normal
> > behavior of these fundamental functions; not to mention break any
> > call sites that have some other means of dealing with an alloc failure
> > besides going belly-up. ?Please take the trouble to do
> > s/malloc/pg_malloc/g and so on, instead.
> 
> Ok, I'll try that approach. This seemed like a "nicer" approach, but I
> think once written out, i agree with your arguments :-)

Where are we on this?

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + It's impossible for everything to be true. +


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Large C files
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: DOMAINs and CASTs