Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

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


  • From: "scott.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: Tue, 22 Jul 2003 14:56:34 -0600 (MDT)
  • Message-id: <Pine.LNX.4.33.0307221456002.20190-100000@css120.ihs.com> <text/plain>

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;






Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group