From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mark Dilger <hornschnorter@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: inappropriate use of NameGetDatum macro
Date: Tue, 13 Sep 2016 17:18:37 -0400
Message-ID: <16910.1473801517@sss.pgh.pa.us> (raw)
In-Reply-To: <13677.1473710134@sss.pgh.pa.us>
References: <EFD8AC94-4C1F-40C1-A5EA-304080089C1B@gmail.com>
<13677.1473710134@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
I wrote:
> Mark Dilger <hornschnorter@gmail.com> writes:
>> there are several places in the code where variables defined as
>> (char *) or as (const char *) are passed to the NameGetDatum()
>> macro. I believe it would be better form to use CStringGetDatum()
>> in these locations. I am aware that these two macros are internally
>> the same.
> I'm tempted to propose that we redefine NameGetDatum as
> #define NameGetDatum(X) CStringGetDatum(NameStr(*(X)))
Pushed with that change.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
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-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, hornschnorter@gmail.com
Subject: Re: inappropriate use of NameGetDatum macro
In-Reply-To: <16910.1473801517@sss.pgh.pa.us>
References: <EFD8AC94-4C1F-40C1-A5EA-304080089C1B@gmail.com> <13677.1473710134@sss.pgh.pa.us> <16910.1473801517@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