Re: Automatically parsing in-line composite types

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Automatically parsing in-line composite types
Дата
Msg-id 31567.1572373980@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Automatically parsing in-line composite types  (Mitar <mmitar@gmail.com>)
Ответы Re: Automatically parsing in-line composite types
Re: Automatically parsing in-line composite types
Список pgsql-general
Mitar <mmitar@gmail.com> writes:
> I think RowDescription should be extended to provide full recursive
> metadata about all data types. That would be the best way to do it.

[ shrug... ]  In a world where stability of the wire protocol were
of zero value, maybe we would do that.  In the real world, don't
hold your breath.

Note that dealing with composite values in full generality is by no
means just a problem of getting this metadata.  Clients would also
have to be prepared to parse and de-escape the data representation,
which is not trivial in either text or binary cases.

On the whole I think it's generally better practice to explode your
composite types into separate fields for transmission to the client.

Note that the cases where JSON or XML shine are where you don't
necessarily have a consistent set of fields in different instances
of the composite values.  Even if we did extend RowDescription to
support describing composites' sub-fields, it wouldn't be in
much of a position to deal with that.

            regards, tom lane



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

Предыдущее
От: Mitar
Дата:
Сообщение: Re: Automatically parsing in-line composite types
Следующее
От: Mitar
Дата:
Сообщение: Re: Automatically parsing in-line composite types