Re: selecting other schema's as the public one from php

From: Sean Davis <sdavis2(at)mail(dot)nih(dot)gov>
To: Michael Cochez <michaelcochez(at)yahoo(dot)com>
Cc: post gresql <pgsql-novice(at)postgresql(dot)org>
Subject: Re: selecting other schema's as the public one from php
Date: 2007-09-20 18:29:44
Message-ID: 46F2BC18.1090107@mail.nih.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Michael Cochez wrote:
> Hello,
> I've created a new schema in my database but i can't select anything
> from the tables into this schema, selecting from the public schema gives
> no trouble.
> I've already tried using the postgres user so i think nothing can be
> wrong with privileges. Any suggestions?

Try this:

set search_path to NEWSCHEMA,public;

where NEWSCHEMA is the name of your new schema. Do this BEFORE doing
anything else with the connection. This will tell postgres to look in
NEWSCHEMA as well as the public schema. You will need to do this with
every new connection to the database.

Sean

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Michael Cochez 2007-09-20 18:46:31 Re: selecting other schema's as the public one from php
Previous Message Michael Cochez 2007-09-20 18:25:28 selecting other schema's as the public one from php