inappropriate use of NameGetDatum macro - Mailing list pgsql-hackers

From Mark Dilger
Subject inappropriate use of NameGetDatum macro
Date
Msg-id EFD8AC94-4C1F-40C1-A5EA-304080089C1B@gmail.com
Whole thread Raw
Responses Re: inappropriate use of NameGetDatum macro  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Friends,

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.

src/backend/commands/proclang.c, line 466.
src/backend/commands/dbcommands.c, lines 1263, 1489, 1606, 1746.

Am I overlooking some reason why the code is correct as is? If not,
I am attaching a patch that applies cleanly for me against master,
compiles, and passes the regression tests.

Thanks,

Mark Dilger


Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_basebackup wish list
Next
From: Petr Jelinek
Date:
Subject: Re: Logical Replication WIP