Re: Protocol buffer support for Postgres

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: Protocol buffer support for Postgres
Дата
Msg-id CAMsr+YHvkocjUehJ-=nTdx4cbuq3p0pr3=4-gNoatnJ4BAGFuA@mail.gmail.com
обсуждение исходный текст
Ответ на Protocol buffer support for Postgres  (陈天舟 <tianzhouchen@gmail.com>)
Ответы Re: Protocol buffer support for Postgres  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 26 April 2016 at 14:06, 陈天舟 <tianzhouchen@gmail.com> wrote:
I am interested in adding Protocol Buffer support for Postgres. Protocol Buffer occupies less space than JSON. More importantly, it has schema and is forward/backward compatible. All these make it a very good format for persistency.

Here are two rough ideas I have right now:

Approach 1:

Creating a datatype "PROTOBUF" similar as "JSON" and implement all the similar support (e.g. indexing) as done for "JSON" Type.
(1) Since each protocol buffer column requires a schema. I am not sure where is the best place to store that schema info. Should it be in a CONSTRAINT (but I am not able to find the doc referring any custom constraint), or should it be in the COMMENT or somewhere else?

I can't really imagine how you'd do that without adding a new catalog like we have for enum members. A typmod isn't sufficient since you need a whole lot more than an integer, and typmods aren't tracked throughout the server that well.

That'll make it hard to do it with an extension.

--
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

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

Предыдущее
От: 陈天舟
Дата:
Сообщение: Protocol buffer support for Postgres
Следующее
От: Noah Misch
Дата:
Сообщение: Re: pg_dump dump catalog ACLs