On Fri, Jun 25, 2010 at 10:00 AM, Tom Lane <t...@sss.pgh.pa.us> wrote:

> Scott Marlowe <scott.marl...@gmail.com> writes:
> > On Fri, Jun 25, 2010 at 7:10 AM, javijava <welove.e.mu...@gmail.com>
> 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

Reply via email to