Re: CREATE ROUTINE MAPPING

2020-01-09 Thread Tom Lane
[ I wasn't paying much attention to this thread at the time, but Kyotaro-san just drew my attention to it again ] Masahiko Sawada writes: > I agree that this feature covers A and B as the first step. But I'm > concerned that for D (and maybe for C?) the volatility of mapped > function could be

Re: CREATE ROUTINE MAPPING

2018-09-11 Thread David Fetter
On Mon, Sep 10, 2018 at 09:28:31AM +0200, Hannu Krosing wrote: > Hi Corey > > Have you looked at pl/proxy ? DBI-Link pre-dated PL/proxy by some years, and was a good bit more flexible as to what types of functions it could send where. Neither has a capability fundamentally similar to this

Re: CREATE ROUTINE MAPPING

2018-09-11 Thread Masahiko Sawada
Thank you for the comment. On Mon, Sep 10, 2018 at 4:16 PM, Kyotaro HORIGUCHI wrote: > Hello. > > At Tue, 4 Sep 2018 09:34:21 +0900, Masahiko Sawada > wrote in >> On Tue, Sep 4, 2018 at 5:48 AM, David Fetter wrote: >> > On Fri, Aug 31, 2018 at 05:18:26PM +0900, Masahiko Sawada wrote: >> >>

Re: CREATE ROUTINE MAPPING

2018-09-10 Thread Corey Huinker
On Mon, Sep 10, 2018 at 3:28 AM Hannu Krosing wrote: > Hi Corey > > Have you looked at pl/proxy ? > I have, a long while ago. > It does this and then some (sharding) > PL/proxy isn't a part of the SQL Standard. PL/proxy only connects to other libpq-speaking databases. The hope with routine

Re: CREATE ROUTINE MAPPING

2018-09-10 Thread Hannu Krosing
Hi Corey Have you looked at pl/proxy ? It does this and then some (sharding) It actually started out as a set of pl/pythonu functions, but then got formalized into a full extension language for defining remote (potentially sharded) function calls Best Regards Hannu Krosng On Fri, 12 Jan

Re: CREATE ROUTINE MAPPING

2018-09-10 Thread Kyotaro HORIGUCHI
Hello. At Tue, 4 Sep 2018 09:34:21 +0900, Masahiko Sawada wrote in > On Tue, Sep 4, 2018 at 5:48 AM, David Fetter wrote: > > On Fri, Aug 31, 2018 at 05:18:26PM +0900, Masahiko Sawada wrote: > >> On Thu, Jan 25, 2018 at 2:13 PM, David Fetter wrote: > >> > On Thu, Jan 18, 2018 at 04:09:13PM

Re: CREATE ROUTINE MAPPING

2018-09-03 Thread Masahiko Sawada
On Tue, Sep 4, 2018 at 5:48 AM, David Fetter wrote: > On Fri, Aug 31, 2018 at 05:18:26PM +0900, Masahiko Sawada wrote: >> On Thu, Jan 25, 2018 at 2:13 PM, David Fetter wrote: >> > On Thu, Jan 18, 2018 at 04:09:13PM -0500, Corey Huinker wrote: >> >> > >> >> > >> >> > > >> >> > > But other

Re: CREATE ROUTINE MAPPING

2018-09-03 Thread David Fetter
On Fri, Aug 31, 2018 at 05:18:26PM +0900, Masahiko Sawada wrote: > On Thu, Jan 25, 2018 at 2:13 PM, David Fetter wrote: > > On Thu, Jan 18, 2018 at 04:09:13PM -0500, Corey Huinker wrote: > >> > > >> > > >> > > > >> > > But other situations seem un-handle-able to me: > >> > > > >> > > SELECT

Re: CREATE ROUTINE MAPPING

2018-08-31 Thread Masahiko Sawada
On Thu, Jan 25, 2018 at 2:13 PM, David Fetter wrote: > On Thu, Jan 18, 2018 at 04:09:13PM -0500, Corey Huinker wrote: >> > >> > >> > > >> > > But other situations seem un-handle-able to me: >> > > >> > > SELECT remote_func1(l.x) FROM local_table l WHERE l.active = true; >> > >> > Do we have any

Re: CREATE ROUTINE MAPPING

2018-01-28 Thread Ashutosh Bapat
On Thu, Jan 25, 2018 at 10:43 AM, David Fetter wrote: > On Thu, Jan 18, 2018 at 04:09:13PM -0500, Corey Huinker wrote: >> > >> > >> > > >> > > But other situations seem un-handle-able to me: >> > > >> > > SELECT remote_func1(l.x) FROM local_table l WHERE l.active = true; >> > >>

Re: CREATE ROUTINE MAPPING

2018-01-24 Thread David Fetter
On Thu, Jan 18, 2018 at 04:09:13PM -0500, Corey Huinker wrote: > > > > > > > > > > But other situations seem un-handle-able to me: > > > > > > SELECT remote_func1(l.x) FROM local_table l WHERE l.active = true; > > > > Do we have any way, or any plan to make a way, to push the set (SELECT > > x

Re: CREATE ROUTINE MAPPING

2018-01-17 Thread David Fetter
On Wed, Jan 17, 2018 at 11:09:19AM -0500, Corey Huinker wrote: > > > CREATE ROUTINE MAPPING local_routine_name > > > > FOR (FUNCTION | PROCEDURE) remote_routine_name ( [ [ argmode ] [ > > argname ] > > > > argtype [ { DEFAULT | = } default_expr ] [, ...] ] ) > > > >[ RETURNS rettype > > > >

Re: CREATE ROUTINE MAPPING

2018-01-17 Thread Corey Huinker
> > CREATE ROUTINE MAPPING local_routine_name > > > FOR (FUNCTION | PROCEDURE) remote_routine_name ( [ [ argmode ] [ > argname ] > > > argtype [ { DEFAULT | = } default_expr ] [, ...] ] ) > > >[ RETURNS rettype > > > | RETURNS TABLE ( column_name column_type [, ...] ) ] > > > SERVER

Re: CREATE ROUTINE MAPPING

2018-01-12 Thread David Fetter
On Fri, Jan 12, 2018 at 02:29:53PM -0500, Corey Huinker wrote: > > > > > > > > It goes on from there, but I think there's a reasonable interpretation > > of this which allows us to use the same syntax as CREATE > > (FUNCTION|PROCEDURE), apart from the body, e.g.: > > > > CREATE ROUTINE MAPPING

Re: CREATE ROUTINE MAPPING

2018-01-12 Thread Corey Huinker
> > > > It goes on from there, but I think there's a reasonable interpretation > of this which allows us to use the same syntax as CREATE > (FUNCTION|PROCEDURE), apart from the body, e.g.: > > CREATE ROUTINE MAPPING local_routine_name > FOR (FUNCTION | PROCEDURE) remote_routine_name ( [ [ argmode

Re: CREATE ROUTINE MAPPING

2018-01-12 Thread David Fetter
On Fri, Jan 12, 2018 at 11:11:26AM -0500, Corey Huinker wrote: > > > > PostgreSQL allows function overloading, which means that there can > > be multiple functions with same name differing in argument types. > > So, the syntax has to include the input parameters or their types > > at least. > >

Re: CREATE ROUTINE MAPPING

2018-01-12 Thread Corey Huinker
> > PostgreSQL allows function overloading, which means that there can be > multiple functions with same name differing in argument types. So, the > syntax has to include the input parameters or their types at least. > "local_routine_name" and "remote_routine_spec" were my own paraphrasings of

Re: CREATE ROUTINE MAPPING

2018-01-12 Thread Pavel Stehule
2018-01-12 10:02 GMT+01:00 Ashutosh Bapat : > On Fri, Jan 12, 2018 at 8:07 AM, Corey Huinker > wrote: > > A few months ago, I was researching ways for formalizing calling > functions > > on one postgres instance from another. RPC,

Re: CREATE ROUTINE MAPPING

2018-01-12 Thread Ashutosh Bapat
On Fri, Jan 12, 2018 at 8:07 AM, Corey Huinker wrote: > A few months ago, I was researching ways for formalizing calling functions > on one postgres instance from another. RPC, basically. In doing so, I > stumbled across an obscure part of the the SQL Standard called

Re: CREATE ROUTINE MAPPING

2018-01-11 Thread David Fetter
On Thu, Jan 11, 2018 at 09:37:43PM -0500, Corey Huinker wrote: > A few months ago, I was researching ways for formalizing calling functions > on one postgres instance from another. RPC, basically. In doing so, I > stumbled across an obscure part of the the SQL Standard called ROUTINE > MAPPING,