pgsql: Fix inconsistencies in SRF checks of pg_config() and string_to_t

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема pgsql: Fix inconsistencies in SRF checks of pg_config() and string_to_t
Дата
Msg-id E1nLImX-000315-NU@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix inconsistencies in SRF checks of pg_config() and string_to_table()

The execution paths of those functions have been using a set of checks
inconsistent with any other SRF function:
- string_to_table() missed a check on expectedDesc, the tuple descriptor
expected by the caller, that should never be NULL.  Introduced in
66f1630.
- pg_config() should check for a ReturnSetInfo, and expectedDesc cannot
be NULL.  Its error messages were also inconsistent.  Introduced in
a5c43b8.

Extracted from a larger patch by the same author, in preparation for a
larger patch set aimed at refactoring the way tuplestores are created
and checked in SRF functions.

Author: Melanie Plageman
Reviewed-by: Justin Pryzby
Discussion: https://postgr.es/m/CAAKRu_azyd1Z3W_r7Ou4sorTjRCs+PxeHw1CWJeXKofkE6TuZg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/07daca53bfcad59618a9c6fad304e380cc9d2bc1

Modified Files
--------------
src/backend/utils/adt/varlena.c    |  3 ++-
src/backend/utils/misc/pg_config.c | 12 ++++++++----
2 files changed, 10 insertions(+), 5 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Rearrange libpq's error reporting to avoid duplicated error text
Следующее
От: Michael Paquier
Дата:
Сообщение: pgsql: doc: Simplify description of --with-lz4