From: | Alban Hertroys <dalroi(at)solfertje(dot)student(dot)utwente(dot)nl> |
---|---|
To: | Craig Ringer <craig(at)postnewspapers(dot)com(dot)au> |
Cc: | Carlos Mennens <carlos(dot)mennens(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Understanding Schema's |
Date: | 2010-12-15 07:29:53 |
Message-ID: | FB2DDF95-5CCE-4659-8C60-F05597B023A9@solfertje.student.utwente.nl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 some use cases it'd be quite handy to use a single database with many schema. Unfortunately most tools only know how to ask for 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!
From | Date | Subject | |
---|---|---|---|
Next Message | Yan Cheng CHEOK | 2010-12-15 09:14:43 | C++ code - PGRES_TUPLES_OK is not returned when DELETE performed |
Previous Message | Adarsh Sharma | 2010-12-15 06:49:19 | Changing WAL Directory in Postgres |