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
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-hackers pgsql-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

Browse pgsql-docs by date

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

Browse pgsql-hackers by date

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

Browse pgsql-patches by date

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