Re: Add dblink function to check if a named connection exists - Mailing list pgsql-hackers

From Tommy Gildseth
Subject Re: Add dblink function to check if a named connection exists
Date
Msg-id 4844316C.8050401@usit.uio.no
Whole thread Raw
In response to Re: Add dblink function to check if a named connection exists  (Joe Conway <mail@joeconway.com>)
List 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


pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: Core team statement on replication in PostgreSQL
Next
From: Martijn van Oosterhout
Date:
Subject: Re: Case-Insensitve Text Comparison