Обсуждение: psql -U user -l cive all db list

Поиск
Список
Период
Сортировка

psql -U user -l cive all db list

От
Margus Roo
Дата:
Hey,
For example, I have 10 postgres db created by postgres superuser postgres.
when I login with postgres and do: psql -l I see all databases its OK.

Now I create new user test_user and create new database with -O
test_user - test_db.
now I do under test_user: psql -U test_user -l and I see again all
databases :( but test_user is only test_db owner.

What I must change that non root user will see only own databases?

Best reg, Margusja

Re: psql -U user -l cive all db list

От
Richard Huxton
Дата:
Margus Roo wrote:
>
> What I must change that non root user will see only own databases?

You can't at the moment. There has been some discussion about this, but
at present read access to the system catalogues is available to everyone.

That doesn't mean they can connect to the database (that's controlled by
your pg_hba.conf file). It does mean you can see what databases are
available though.

--
   Richard Huxton
   Archonet Ltd

Re: psql -U user -l cive all db list

От
Scott Marlowe
Дата:
On Tue, 2005-05-17 at 04:52, Richard Huxton wrote:
> Margus Roo wrote:
> >
> > What I must change that non root user will see only own databases?
>
> You can't at the moment. There has been some discussion about this, but
> at present read access to the system catalogues is available to everyone.
>
> That doesn't mean they can connect to the database (that's controlled by
> your pg_hba.conf file). It does mean you can see what databases are
> available though.

Everyone realizes that even Oracle doesn't provide this functionality,
right?

Re: psql -U user -l cive all db list

От
Tino Wildenhain
Дата:
Am Dienstag, den 17.05.2005, 08:58 -0500 schrieb Scott Marlowe:
> On Tue, 2005-05-17 at 04:52, Richard Huxton wrote:
> > Margus Roo wrote:
> > >
> > > What I must change that non root user will see only own databases?
> >
> > You can't at the moment. There has been some discussion about this, but
> > at present read access to the system catalogues is available to everyone.
> >
> > That doesn't mean they can connect to the database (that's controlled by
> > your pg_hba.conf file). It does mean you can see what databases are
> > available though.
>
> Everyone realizes that even Oracle doesn't provide this functionality,
> right?
>
And you can get close to that if you carefully moc around with
the system tables and views and their permissions.
But if you do it wrong - restore is your friend :-)

Regards
Tino
--
Tino Wildenhain <tino@wildenhain.de>


Re: psql -U user -l cive all db list

От
Scott Marlowe
Дата:
On Tue, 2005-05-17 at 09:18, Tino Wildenhain wrote:
> Am Dienstag, den 17.05.2005, 08:58 -0500 schrieb Scott Marlowe:
> > On Tue, 2005-05-17 at 04:52, Richard Huxton wrote:
> > > Margus Roo wrote:
> > > >
> > > > What I must change that non root user will see only own databases?
> > >
> > > You can't at the moment. There has been some discussion about this, but
> > > at present read access to the system catalogues is available to everyone.
> > >
> > > That doesn't mean they can connect to the database (that's controlled by
> > > your pg_hba.conf file). It does mean you can see what databases are
> > > available though.
> >
> > Everyone realizes that even Oracle doesn't provide this functionality,
> > right?
> >
> And you can get close to that if you carefully moc around with
> the system tables and views and their permissions.
> But if you do it wrong - restore is your friend :-)

All for a feature of questionable value.

Better to worry about the real security than worry about such things I
think.

TIP 9

От
Joseph Shraibman
Дата:
Doesn't this need to be ammened to say "before 8.0"?

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
       joining column's datatypes do not match