inappropriate use of NameGetDatum macro

Поиск
Список
Период
Сортировка
От Mark Dilger
Тема inappropriate use of NameGetDatum macro
Дата
Msg-id EFD8AC94-4C1F-40C1-A5EA-304080089C1B@gmail.com
обсуждение исходный текст
Ответы Re: inappropriate use of NameGetDatum macro  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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


Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pg_basebackup wish list
Следующее
От: Petr Jelinek
Дата:
Сообщение: Re: Logical Replication WIP