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

From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: Dilan Arumainathan <dilan_a(at)impark(dot)com>
Cc: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: How can I set a default schema for a session
Date: 2003-07-22 20:56:34
Message-ID: Pine.LNX.4.33.0307221456002.20190-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Tue, 22 Jul 2003, 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?

Just change search_path to include it:

psql
> set search_path=$user,public,mynewschema;

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Nick Fankhauser 2003-07-22 21:04:31 Re: pg_restore problem!!!
Previous Message David Olbersen 2003-07-22 20:54:09 Re: pg_restore problem!!!