Re: default postgreSQL schema
| From: | Chris | Date: | Mon, 20 Nov 2006 23:02:16 +0000 |
| Subject: | Re: default postgreSQL schema | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-244910@lists.php.net to get a copy of this message | ||
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/