small cleanup: unify scanstr() functions

Поиск
Список
Период
Сортировка
От John Naylor
Тема small cleanup: unify scanstr() functions
Дата
Msg-id CACPNZCtDpd18T0KATTmCggO2GdVC4ow86ypiq5ENff1VnauL8g@mail.gmail.com
обсуждение исходный текст
Ответы Re: small cleanup: unify scanstr() functions  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi,

Looking at the guc file code, GUC_scanstr() is almost the same as the
exported function scanstr(), except the latter requires finicky extra
coding around double quotes both in its callers and while creating the
input.

In the attached, the GUC_scanstr() function body is moved to scansup.c
to replace scanstr(), but with a different order of if-statements to
make the diff smaller. Since we have control over what goes in the BKI
file, we can use single-quoted escape strings there, allowing removal
of special case code for double quotes.

--
John Naylor                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Вложения

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

Предыдущее
От: Daniel Gustafsson
Дата:
Сообщение: Re: Error code missing for "wrong length of inner sequence" error
Следующее
От: Bharath Rupireddy
Дата:
Сообщение: Re: Retry Cached Remote Connections for postgres_fdw in case remote backend gets killed/goes away