pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
[admin]@postgresql.org pg_database contents ... what happens
3+ messages / 3 participants
[nested] [flat]

* [admin]@postgresql.org pg_database contents ... what happens
@ 2004-05-31 04:44  Paul Gimpelj <pgimpelj@sympatico.ca>
  0 siblings, 1 reply; 3+ messages in thread

From: Paul Gimpelj @ 2004-05-31 04:44 UTC (permalink / raw)
  To: pgsql-admin

If I connect to any database with psql I can see all the other databases in table pg_database
under postgresql 7.2

What happens if I delete all the rows from this table.

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: [admin]@postgresql.org pg_database contents ... what happens
@ 2004-05-31 05:45  Uwe C. Schroeder <uwe@oss4u.com>
  parent: Paul Gimpelj <pgimpelj@sympatico.ca>
  0 siblings, 1 reply; 3+ messages in thread

From: Uwe C. Schroeder @ 2004-05-31 05:45 UTC (permalink / raw)
  To: Paul Gimpelj <pgimpelj@sympatico.ca>; pgsql-admin

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sunday 30 May 2004 09:44 pm, Paul Gimpelj wrote:
> If I connect to any database with psql I can see all the other databases in
> table pg_database under postgresql 7.2
>
> What happens if I delete all the rows from this table.


Well, similar question would be "what happens if I format the harddrive and 
throw the box into the bathtub" :-)

	UC

- --
Open Source Solutions 4U, LLC	2570 Fleetwood Drive
Phone:  +1 650 872 2425		San Bruno, CA 94066
Cell:   +1 650 302 2405		United States
Fax:    +1 650 872 2417
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQFAusZejqGXBvRToM4RAurNAKCmN8Zl0q45v4c8d3ueCtBI3RkG5QCdGMfz
N2h04lJOnXNAM1Ywml9vh0Y=
=WgMl
-----END PGP SIGNATURE-----




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: [admin]@postgresql.org pg_database contents ... what happens
@ 2004-05-31 11:10  Artur P <arturp@plukwa.net>
  parent: Uwe C. Schroeder <uwe@oss4u.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Artur P @ 2004-05-31 11:10 UTC (permalink / raw)
  To: pgsql-admin

On Sun, May 30, 2004 at 10:45:02PM -0700, Uwe C. Schroeder wrote:
> On Sunday 30 May 2004 09:44 pm, Paul Gimpelj wrote:
> > If I connect to any database with psql I can see all the other databases in
> > table pg_database under postgresql 7.2
> >
> > What happens if I delete all the rows from this table.
> 
> 
> Well, similar question would be "what happens if I format the harddrive and 
> throw the box into the bathtub" :-)

	I wouldn't say so - you can delete from pg_database only if you
are are granted database create/drop (or you are superuser).

	If I understand Paul correctly, his real question was "I can see
pg_database if I connect to any database, as any user - is it
safe/secure?". Then, answer to this question would be: yes, as long as
you are normal user, because it is one of PostgreSQL's system tables. You
can select from that table, but to update/delete from that table, you
need to have rights to create/drop database.

	Do "select * from pg_shadow" as postgresql superuser, to check users
that have permission to create/drop (see
http://www.postgresql.org/docs/7.4/interactive/catalog-pg-shadow.html).

	So, to be safe, do not grant database creation rights to users that
shouldn't have them (see also "Chapter 17. Database Users and Privileges" ->
"17.2. User Attributes"
http://www.postgresql.org/docs/7.4/interactive/user-attributes.html)

	Best regards,
-- 
--- Artur Pietruk, arturp(-=AT=-)plukwa.net



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2004-05-31 11:10 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-05-31 04:44 [admin]@postgresql.org pg_database contents ... what happens Paul Gimpelj <pgimpelj@sympatico.ca>
2004-05-31 05:45 ` Uwe C. Schroeder <uwe@oss4u.com>
2004-05-31 11:10   ` Artur P <arturp@plukwa.net>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox