From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Michael Paquier <michael.paquier@gmail.com>
Cc: Bill Parker <wp02855@gmail.com>
Cc: PostgreSQL mailing lists <pgsql-bugs@postgresql.org>
Subject: Re: Lack of Sanity Checking in file 'pctcl.c' for PostgreSQL 9.4.x
Date: Fri, 12 Jun 2015 23:41:51 -0400
Message-ID: <4457.1434166911@sss.pgh.pa.us> (raw)
In-Reply-To: <20150612194716.GQ133018@postgresql.org>
References: <CAFrbyQwyLDYXfBOhPfoBGqnvuZO_Y90YgqFM11T2jvnxjLFmqw@mail.gmail.com>
<CAB7nPqRmXz2DymNd_BX8HkaRJuQCTUyhh2d5Zx+d0aHNvpTw0Q@mail.gmail.com>
<20150612194716.GQ133018@postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> Michael Paquier wrote:
>> By the way, your patch does not compile properly and is not in-line
>> with the project's code format. See the updated patch attached ;)
> ... or the conventions for allocating memory. Why not just use palloc()?
That's hardly the fault of the proposed patch. But yeah, it seems like
much the best fix here is to get rid of the malloc (and strdup) calls in
this code in favor of using the palloc infrastructure. Even the calls
that *do* have manual failure checks are not compliant with our usual
coding standards.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, alvherre@2ndquadrant.com, michael.paquier@gmail.com, wp02855@gmail.com
Subject: Re: Lack of Sanity Checking in file 'pctcl.c' for PostgreSQL 9.4.x
In-Reply-To: <4457.1434166911@sss.pgh.pa.us>
References: <CAFrbyQwyLDYXfBOhPfoBGqnvuZO_Y90YgqFM11T2jvnxjLFmqw@mail.gmail.com> <CAB7nPqRmXz2DymNd_BX8HkaRJuQCTUyhh2d5Zx+d0aHNvpTw0Q@mail.gmail.com> <20150612194716.GQ133018@postgresql.org> <4457.1434166911@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox