X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A9A72D1B19C for ; Thu, 24 Jun 2004 11:02:10 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 80190-02 for ; Thu, 24 Jun 2004 14:02:09 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 6B063D1B18E for ; Thu, 24 Jun 2004 11:02:05 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i5OE28wY013535; Thu, 24 Jun 2004 10:02:09 -0400 (EDT) To: "Thomas Hallgren" Cc: pgsql-hackers@postgresql.org Subject: Re: bug in GUC In-reply-to: References: <20040624052712.GA7158@dcc.uchile.cl> Comments: In-reply-to "Thomas Hallgren" message dated "Thu, 24 Jun 2004 11:06:25 +0200" Date: Thu, 24 Jun 2004 10:02:08 -0400 Message-ID: <13534.1088085728@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200406/857 X-Sequence-Number: 55407 "Thomas Hallgren" 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