On Wed, Aug 6, 2014 at 12:12:29AM -0300, Fabrízio de Royes Mello wrote: > > On Tue, Aug 5, 2014 at 10:55 PM, Tom Lane <[email protected]> wrote: > > Josh Berkus <[email protected]> writes: > > BTW, while there's unlikely to be a good reason to put search_path in > > pg.conf with appends, there are a LOT of reasons to want to be able to > > append to it during a session. > > [shrug...] You can do that today with current_setting()/set_config(). > > > > +1 > > With a very simple statement you can do that: > > fabrizio=# SELECT current_setting('search_path'); > current_setting > ----------------- > "$user",public > (1 row) > > fabrizio=# SELECT set_config('search_path', current_setting('search_path')||', > another_schema', false); > set_config > -------------------------------- > "$user",public, another_schema > (1 row)
Yes, that is very nice, but it only works for session-level changes, i.e. you can't use that in postgresql.conf or via ALTER USER/DATABASE. -- Bruce Momjian <[email protected]> http://momjian.us EnterpriseDB http://enterprisedb.com + Everyone has their own god. + -- Sent via pgsql-hackers mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
