Re: schema name in SQL statement.

From: Lennin Caro <lennin(dot)caro(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org, "Masis, Alexander \(US SSA\)" <alexander(dot)masis(at)baesystems(dot)com>
Subject: Re: schema name in SQL statement.
Date: 2008-08-20 16:12:25
Message-ID: 842435.32861.qm@web59505.mail.ac4.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

--- On Tue, 8/19/08, Masis, Alexander (US SSA) <alexander(dot)masis(at)baesystems(dot)com> wrote:

> From: Masis, Alexander (US SSA) <alexander(dot)masis(at)baesystems(dot)com>
> Subject: [GENERAL] schema name in SQL statement.
> To: pgsql-general(at)postgresql(dot)org
> Date: Tuesday, August 19, 2008, 10:52 PM
> I have to explicitly specify the schema name to make SQL
> statement to
> work.
> Can I set the schema before the query, or set a default
> schema?
> My current statement:
> "SELECT col FROM schema.table"
> I like to be able to use generic SQL statement like:
> "SELECT col FROM table"
>
>
>
> --
> Sent via pgsql-general mailing list
> (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general

you can change the search path of the schema

SET search_path TO myschema

In response to

Browse pgsql-general by date

  From Date Subject
Next Message James Neff 2008-08-20 16:59:34 function SETOF return type with variable columns?
Previous Message hubert depesz lubaczewski 2008-08-20 15:47:52 Re: Time of 'pg_ctl reload'.