Skip site navigation (1) Skip section navigation (2)

Re: Add dblink function to check if a named connection exists

From: Tommy Gildseth <tommy(dot)gildseth(at)usit(dot)uio(dot)no>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Add dblink function to check if a named connection exists
Date: 2008-06-02 17:44:12
Message-ID: 4844316C.8050401@usit.uio.no (view raw or flat)
Thread:
Lists: pgsql-hackers
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.


-- 
Tommy Gildseth

In response to

pgsql-hackers by date

Next:From: Martijn van OosterhoutDate: 2008-06-02 17:55:16
Subject: Re: Case-Insensitve Text Comparison
Previous:From: Hannu KrosingDate: 2008-06-02 17:37:59
Subject: Re: Core team statement on replication in PostgreSQL

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group