pgsql: Fix hstore_to_json_loose's detection of valid JSON number values

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема pgsql: Fix hstore_to_json_loose's detection of valid JSON number values
Дата
Msg-id E1XvUCr-0005lv-7l@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix hstore_to_json_loose's detection of valid JSON number values.

We expose a function IsValidJsonNumber that internally calls the lexer
for json numbers. That allows us to use the same test everywhere,
instead of inventing a broken test for hstore conversions. The new
function is also used in datum_to_json, replacing the code that is now
moved to the new function.

Backpatch to 9.3 where hstore_to_json_loose was introduced.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/e09996ff8dee3f70b0a027cffebccef4388ed5b7

Modified Files
--------------
contrib/hstore/hstore_io.c   |   43 ++-----------------------------
src/backend/utils/adt/json.c |   57 +++++++++++++++++++++++++++---------------
src/include/utils/jsonapi.h  |    7 ++++++
3 files changed, 46 insertions(+), 61 deletions(-)


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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: pgsql: Put SSL_pending() call behind the new internal SSL API.
Следующее
От: Andrew Dunstan
Дата:
Сообщение: pgsql: Fix hstore_to_json_loose's detection of valid JSON number values