Re: Add dblink function to check if a named connection exists
В списке pgsql-hackers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: Add dblink function to check if a named connection exists |
| Дата | |
| Msg-id | 28839.1211987826@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Add dblink function to check if a named connection exists (Tommy Gildseth <tommy.gildseth@usit.uio.no>) |
| Ответы |
Re: Add dblink function to check if a named connection
exists
|
| Список | pgsql-hackers |
Tommy Gildseth <tommy.gildseth@usit.uio.no> 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 connection already exists.
Can't you do this already?
SELECT 'myconn' = ANY (dblink_get_connections());
A dedicated function might be a tad faster, but it probably isn't going
to matter compared to the overhead of sending a remote query.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера