Joe Conway wrote:
Tom Lane wrote:
Tommy Gildseth <[EMAIL PROTECTED]> writes:
One obvious disadvantage of this approach, is that I need to connect
and disconnect in every function. A possible solution to this, would
be having a function f.ex dblink_exists('connection_name') that
returns true/f
Joe Conway wrote:
If you really want the notational simplicity, you could use an SQL
function to wrap it:
CREATE OR REPLACE FUNCTION dblink_exists(text)
RETURNS bool AS $$
SELECT $1 = ANY (dblink_get_connections())
$$ LANGUAGE sql;
Thanks, that seems like a reasonable way to solve this.
Just use plproxy and skip all the hassle of dblink :)
On Mon, Jun 2, 2008 at 3:14 AM, Joe Conway <[EMAIL PROTECTED]> wrote:
> Tom Lane wrote:
>
>> Tommy Gildseth <[EMAIL PROTECTED]> writes:
>>
>>> One obvious disadvantage of this approach, is that I need to connect and
>>> disconnect in every fun
Tom Lane wrote:
Tommy Gildseth <[EMAIL PROTECTED]> writes:
One obvious disadvantage of this approach, is that I need to connect and
disconnect in every function. A possible solution to this, would be
having a function f.ex dblink_exists('connection_name') that returns
true/false depending on w
Tommy Gildseth <[EMAIL PROTECTED]> writes:
> One obvious disadvantage of this approach, is that I need to connect and
> disconnect in every function. A possible solution to this, would be
> having a function f.ex dblink_exists('connection_name') that returns
> true/false depending on whether the
I have locked down access to all dblink_* functions, so that only
certain privileged users have access to them, and instead provide a set
of SRF functions defined as security definer functions, where I connect
to the remote server, fetch some data, disconnect from remote server,
and return the