|From:||Tommy Gildseth <tommy(dot)gildseth(at)usit(dot)uio(dot)no>|
|Subject:||Add dblink function to check if a named connection exists|
|Views:||Raw Message | Whole Thread | Download mbox | Resend email|
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 data.
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 connection already exists. This
way, I could just check if a named connection exists, and establish a
connection if not, and wait until the end of the session to disconnect
all established connections.
I've attached a patch with a suggested implementation of such a function.
|Next Message||Simon Riggs||2008-05-28 08:25:54||Re: Hint Bits and Write I/O|
|Previous Message||Radek Strnad||2008-05-28 00:22:39||Proposal - Collation at database level|