Re: Understanding Schema's - Mailing list pgsql-general

From Alban Hertroys
Subject Re: Understanding Schema's
Date
Msg-id FB2DDF95-5CCE-4659-8C60-F05597B023A9@solfertje.student.utwente.nl
Whole thread Raw
In response to Re: Understanding Schema's  (Craig Ringer <craig@postnewspapers.com.au>)
List pgsql-general
On 15 Dec 2010, at 3:14, Craig Ringer wrote:

> It'd be nice if PostgreSQL offered more convenient ways to set an initial schema for new connections, because for
someuse cases it'd be quite handy to use a single database with many schema. Unfortunately most tools only know how to
askfor a database name, not a schema name, and there's no way to set the search_path in (AFAIK) a JDBC URL. So in this
way,PostgreSQL schema are very _unlike_ mysql databases. 


I doubt you're unaware of this - you're a long-time user after all, but you can set the default search path per user.
So,if you (can) use different database users for different connections, the above is possible. 
There's also this (also per user):

development=> \h CREATE SCHEMA
Command:     CREATE SCHEMA
Description: define a new schema
Syntax:
CREATE SCHEMA schemaname [ AUTHORIZATION username ] [ schema_element [ .... ] ]
CREATE SCHEMA AUTHORIZATION username [ schema_element [ ... ] ]


Alban Hertroys

--
Screwing up is an excellent way to attach something to the ceiling.


!DSPAM:737,4d086e81802651124320305!



pgsql-general by date:

Previous
From: John R Pierce
Date:
Subject: Re: Changing WAL Directory in Postgres
Next
From: Yan Cheng CHEOK
Date:
Subject: C++ code - PGRES_TUPLES_OK is not returned when DELETE performed