Re: inappropriate use of NameGetDatum macro - Mailing list pgsql-hackers

From Tom Lane
Subject Re: inappropriate use of NameGetDatum macro
Date
Msg-id 16910.1473801517@sss.pgh.pa.us
Whole thread Raw
In response to Re: inappropriate use of NameGetDatum macro  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-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



pgsql-hackers by date:

Previous
From: Petr Jelinek
Date:
Subject: Re: autonomous transactions
Next
From: Peter Eisentraut
Date:
Subject: Re: pg_basebackup wish list