Re: dblink: give search_path - Mailing list pgsql-general

From Thiemo Kellner, NHC Barhufpflege
Subject Re: dblink: give search_path
Date
Msg-id 20180417132308.11075gcbf98r0s0s@www.gelassene-pferde.biz
Whole thread Raw
In response to Re: dblink: give search_path  (Adrian Klaver <adrian.klaver@aklaver.com>)
List pgsql-general
Zitat von Adrian Klaver <adrian.klaver@aklaver.com>:

> 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
>

Hi Adrian. Thanks for pointing this out. I wonder why I did not think
of it myself. However, I moved to a dedicated logging user such
avoiding this Problem. I also seems a clean solution that way.

--
+49 (0)1578-772 37 37
+41 (0)78 947 36 21
Öffentlicher PGP-Schlüssel:
http://pgp.mit.edu/pks/lookup?op=get&search=0x8F70EFD2D972CBEF

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


pgsql-general by date:

Previous
From: Gao Jack
Date:
Subject: RE: pg_dump to a remote server
Next
From: Thiemo Kellner
Date:
Subject: Re: psql variable to plpgsql?