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

Re: bug in GUC

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Thomas Hallgren" <thhal(at)mailblocks(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: bug in GUC
Date: 2004-06-24 14:02:08
Message-ID: 13534.1088085728@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-docspgsql-hackerspgsql-patches
"Thomas Hallgren" <thhal(at)mailblocks(dot)com> writes:
> Rather than clutter the code with the same ereport over and over again (I
> count 12 malloc's in guc.c alone), I'd like something like this:

The larger question is why it contains even one.  In general, use of
malloc in the backend is the mark of a newbie.  I'd think palloc in
TopMemoryContext would be a more suitable approach.

			regards, tom lane

In response to

Responses

pgsql-docs by date

Next:From: Thomas HallgrenDate: 2004-06-24 14:45:31
Subject: Re: bug in GUC
Previous:From: Thomas HallgrenDate: 2004-06-24 09:06:25
Subject: Re: bug in GUC

pgsql-hackers by date

Next:From: Jeroen T. VermeulenDate: 2004-06-24 14:09:37
Subject: Re: PREPARE and transactions
Previous:From: Greg StarkDate: 2004-06-24 12:54:09
Subject: Re: warning missing

pgsql-patches by date

Next:From: Tom LaneDate: 2004-06-24 14:32:21
Subject: Re: pg_dump --clean w/ <= 7.2 server
Previous:From: Christopher Kings-LynneDate: 2004-06-24 13:58:22
Subject: Re: pg_dump --clean w/ <= 7.2 server

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