Re: dblink: give search_path

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: dblink: give search_path
Дата
Msg-id 2b63fb34-7057-d734-bdcc-284bd5c34e61@aklaver.com
обсуждение исходный текст
Ответ на dblink: give search_path  (Thiemo Kellner <thiemo@gelassene-pferde.biz>)
Ответы Re: dblink: give search_path  ("Thiemo Kellner, NHC Barhufpflege"<thiemo.kellner@gelassene-pferde.biz>)
Список pgsql-general
On 04/10/2018 11:44 PM, Thiemo Kellner wrote:
> Hi all
> 
> I try to execute a function not in the Schema I connect to with dblink. 
> Is there way to tell dblink to set search_path in a specific way? I have 
> not found a solution in the documentation. I tried with the set 
> search_path definition in the function declarations to no avail.

In addition to my previous suggestions:

test=# SELECT public.dblink_connect('dbname=production ');
  dblink_connect
----------------
  OK

test=# select * from  public.dblink('show search_path') as 
t1(search_path text);
  search_path
-------------
  main

test=# select public.dblink_exec('set search_path=main,utility');
  dblink_exec
-------------
  SET
(1 row)

test=# select * from  public.dblink('show search_path') as 
t1(search_path text);
   search_path
---------------
  main, utility

> 
> Function Schema: logger
> Database: act
> User: act
> User Default Schema: act
> 
> Kind regards
> 
> Thiemo
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com


В списке pgsql-general по дате отправления:

Предыдущее
От: camarillo
Дата:
Сообщение: pg_basebackup restore a single table
Следующее
От: Andreas Kretschmer
Дата:
Сообщение: Re: pg_basebackup restore a single table