Search Postgresql Archives

Re: Equivalent to "use database" in postgre

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

 





On Fri, Jun 25, 2010 at 10:00 AM, Tom Lane <tgl@xxxxxxxxxxxxx> wrote:
Scott Marlowe <scott.marlowe@xxxxxxxxx> writes:
> On Fri, Jun 25, 2010 at 7:10 AM, javijava <welove.e.music@xxxxxxxxx> wrote:
>> How can I say "use name_database" on postgre sql?

> You have to re-connect to use a different db in pgsql.

But keep in mind that mysql databases are more nearly akin to what
postgres calls schemas.  The best way to do what you want might be
to translate your mysql DBs into schemas, and then "set search_path"
would be a good approximation to "use".

The issue here may be data isolation.   Suppose you have two independent groups, one with database A and one with database B.  (Think of a company that hosts databases for its customers, for example.) 

In the ideal situation, the people with access only to database A should not even be able to learn that database B exists, much less access it in any fashion. 

I believe PG does not have the capability to completely isolate other databases from users running on the same server, I'm not sure if MySQL does or not.

However, if there are any times when it might be necessary to query both database A and database B, then schemas are the way to go. 
--
Mike Nolan
PG user by choice
MySQL user by necessity

[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