thanks a lot. I also find that i can setup it directly to DB thanks to alter command. I was thinking that maybe PHP had a special command for that, but it seems not. Alain On 11/21/06, Chris <dmagick@xxxxxxxxx> wrote:
Alain Roger wrote: > Hi, > > I would like to know if under PHP i can setup the default schema for a > PostgreSQL database ? > > e.g if my database name is 'mydb', my schema 'immense', i would like to > avoid : > > immense.my_function_name(parameter1, parameter2,..) > > ... > select * from immense.table1 WHERE immense.table1.field1 = > immense.table2.field5; Definitely not a php thing but here's a page with how to do it: http://www.postgresql.org/docs/8.1/interactive/ddl-schemas.html Basically you need to do: pg_query('SET search_path TO myschema,public'); straight after your pg_connect call. -- Postgresql & php tutorials http://www.designmagick.com/
-- Alain ------------------------------------ Windows XP SP2 PostgreSQL 8.1.4 Apache 2.0.58 PHP 5