Re: [PATCH] postgres_fdw extension support - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [PATCH] postgres_fdw extension support
Date
Msg-id CAB7nPqQBs+28A4u+ng72b26pNvGa-WT-M_TCW-eAVApD=ekF2w@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] postgres_fdw extension support  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers


On Sat, Aug 22, 2015 at 12:55 AM, Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
Michael Paquier wrote:

>         if (needlabel)
>                 appendStringInfo(buf, "::%s",
> -
> format_type_with_typemod(node->consttype,
> -
> node->consttypmod));
> +
> format_type_be_qualified(node->consttype));
> Pondering more about this one, I think that we are going to need a new
> routine in format_type.c to be able to call format_type_internal as
> format_type_internal(type_oid, typemod, true/false, false, true). If
> typemod is -1, then typemod_given (the third argument) is false, otherwise
> typemod_given is true. That's close to what the C function format_type at
> the SQL level can do except that we want it to be qualified. Regression
> tests will need an update as well.

I don't know what's going on here, but please look at the patch posted
by Alexander Shulgin in the thread about JSON DDL deparse today; there's
some additional stuff in format_type.c there that is probably useful to
share between these two patches.

Oh, OK. That's good to know. I'll have a look at it. I think that it may be possible to extract a single patch usable for both facilities.
--
Michael

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Memory allocation in spi_printtup()
Next
From: Kouhei Kaigai
Date:
Subject: Re: DBT-3 with SF=20 got failed