Re: Cache lookup error when using jsonb, json_build_object and a WITH clause

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Cache lookup error when using jsonb, json_build_object and a WITH clause
Дата
Msg-id 17257.1399643277@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Cache lookup error when using jsonb, json_build_object and a WITH clause  (Andres Freund <andres@2ndquadrant.com>)
Ответы Re: Cache lookup error when using jsonb, json_build_object and a WITH clause
Список pgsql-hackers
Andres Freund <andres@2ndquadrant.com> writes:
> Whoa. There's two wierd things here:
> a) "jsonb" has a typcategory 'C'. Marking a composite type. "json" has
>    'U'.

Yeah, that's flat out wrong.  I changed it before seeing your message.

> b) datum_to_json() thinks it's a good idea to use typcategory to decide
>    how a type is output. Isn't that pertty fundamentally flawed?

Indeed.  I think the bit that uses TYPCATEGORY_NUMERIC as a hint to decide
whether the value can be left unquoted (assuming it looks like a number)
might be all right, but the rest of this seems pretty bogus.
        regards, tom lane



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

Предыдущее
От: Fujii Masao
Дата:
Сообщение: Re: postgresql.auto.conf read from wrong directory
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: New pg_lsn type doesn't have hash/btree opclasses