Search Postgresql Archives

Re: Understanding Schema's

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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!



-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux