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

From Tom Lane
Subject Re: [PATCH] postgres_fdw extension support
Date
Msg-id 15462.1446614639@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCH] postgres_fdw extension support  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: [PATCH] postgres_fdw extension support  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers
Michael Paquier <michael.paquier@gmail.com> writes:
> On Wed, Nov 4, 2015 at 12:38 PM, Tom Lane wrote:
>> I had a possibly better idea: instead of manufacturing an empty extension
>> with a direct INSERT, hack on the one extension that we know for sure
>> will be installed, namely postgres_fdw itself.  So we could do, eg,
>> 
>> create function foo() ...
>> alter extension postgres_fdw add function foo();
>> and then test shippability of foo() with or without having listed
>> postgres_fdw as a shippable extension.

> Yeah, I don't have a better idea than that. Could we consider shipping
> that in a different library than postgres_fdw.so, like
> postgres_fdw_test.so?

I'm envisioning the extra function(s) as just being SQL functions, so
they don't need any particular infrastructure.

> That's still strange to have a dummy object in
> postgres_fdw.so just for testing purposes.

We could drop the extra functions at the end of the test, but I don't
see the point exactly.  We'd just be leaving the regression test database
with some odd contents of the extension --- there's not any wider effect
than that.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [PATCH] postgres_fdw extension support
Next
From: YuanyuanLiu
Date:
Subject: Re: Why not to use 'pg_ctl start -D ../data' to register posgtresql windows service