Re: Protocol buffer support for Postgres - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Protocol buffer support for Postgres
Date
Msg-id 26733.1461678053@sss.pgh.pa.us
Whole thread Raw
In response to Re: Protocol buffer support for Postgres  (Craig Ringer <craig@2ndquadrant.com>)
Responses Re: Protocol buffer support for Postgres  (Paul Ramsey <pramsey@cleverelephant.ca>)
List pgsql-hackers
Craig Ringer <craig@2ndquadrant.com> writes:
> On 26 April 2016 at 14:06, 陈天舟 <tianzhouchen@gmail.com> wrote:
>> (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.

PostGIS manages to reference quite a lot of schema-like information via
a geometry column's typmod.  Maybe there's a reason why their approach
wouldn't be a good fit for this, but it'd be worth investigating.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Nikolay Shaplov
Date:
Subject: [PATCH] amroutine->amsupport from numeric to defined constants
Next
From: Paul Ramsey
Date:
Subject: Re: Protocol buffer support for Postgres