Re: How can I set a default schema for a session

From: Ian Barwick <barwick(at)gmx(dot)net>
To: "Dilan Arumainathan" <dilan_a(at)impark(dot)com>, <pgsql-admin(at)postgresql(dot)org>
Subject: Re: How can I set a default schema for a session
Date: 2003-07-22 21:18:58
Message-ID: 200307222318.58234.barwick@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Tuesday 22 July 2003 22:52, Dilan Arumainathan wrote:
> Hi,
> Every time I have to specify a table name in a query I find myself
> prefixing the name of the table with the schema name as in schema.table. Is
> there a way to force the queries to look in one particular schema whenever
> I do not specify a schema name?

SET search_path TO ...

http://www.postgresql.org/docs/7.3/static/ddl-schemas.html

You can also use

ALTER USER user_name SET search_path to ...;

to make the setting permanent.

Ian Barwick
barwick(at)gmx(dot)net

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Andrew Biagioni 2003-07-22 21:25:28 Re: Replication/Failover/HA solution
Previous Message David Olbersen 2003-07-22 21:15:27 Re: pg_restore problem!!!