From pgimpelj@sympatico.ca Mon May 31 05:23:24 2004 X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id C9616D1B1BD for ; Mon, 31 May 2004 02:23:24 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 50058-09 for ; Mon, 31 May 2004 02:23:23 -0300 (ADT) Received: from tomts13-srv.bellnexxia.net (tomts13.bellnexxia.net [209.226.175.34]) by svr1.postgresql.org (Postfix) with ESMTP id C0231D1B1AE for ; Mon, 31 May 2004 02:23:20 -0300 (ADT) Received: from zoom ([206.172.136.82]) by tomts13-srv.bellnexxia.net (InterMail vM.5.01.06.10 201-253-122-130-110-20040306) with SMTP id <20040531052304.UIYL21087.tomts13-srv.bellnexxia.net@zoom> for ; Mon, 31 May 2004 01:23:04 -0400 Message-ID: <011801c446ca$09b1c580$3410fea9@zoom> From: "Paul Gimpelj" To: Subject: [admin]@postgresql.org pg_database contents ... what happens Date: Mon, 31 May 2004 00:44:06 -0400 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0115_01C446A8.60ACBD80" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.4 tagged_above=0.0 required=5.0 tests=HTML_50_60, HTML_MESSAGE, RCVD_IN_RFCI, RCVD_IN_SORBS X-Spam-Level: X-Archive-Number: 200405/334 X-Sequence-Number: 13650 This is a multi-part message in MIME format. ------=_NextPart_000_0115_01C446A8.60ACBD80 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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. ------=_NextPart_000_0115_01C446A8.60ACBD80 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
If I connect to any database with psql I c= an see=20 all the other databases in table pg_database
under postgresql 7.2
 
What happens if I delete all the rows from= this=20 table.
 
 
------=_NextPart_000_0115_01C446A8.60ACBD80-- From uwe@oss4u.com Mon May 31 05:45:06 2004 X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 35660D1B256 for ; Mon, 31 May 2004 02:45:06 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 57631-07 for ; Mon, 31 May 2004 02:45:05 -0300 (ADT) Received: from pop.sanbrunocable.com (pop.sanbrunocable.com [65.172.230.120]) by svr1.postgresql.org (Postfix) with ESMTP id 8DC24D1B26D for ; Mon, 31 May 2004 02:45:03 -0300 (ADT) Received: from oss4u.com (cpe-65-172-234-54.sanbrunocable.com [65.172.234.54]) by pop.sanbrunocable.com (8.11.6/8.11.6) with SMTP id i4V5iJi06317 for ; Sun, 30 May 2004 22:44:19 -0700 Received: (qmail 4240 invoked from network); 31 May 2004 05:42:15 -0000 Received: from tiburon.oss4u.com (192.168.1.4) by gw.oss4u.com (192.168.1.1) with ESMTP; 31 May 2004 05:42:15 -0000 From: "Uwe C. Schroeder" Organization: OSS4U, LLC To: "Paul Gimpelj" , Subject: Re: [admin]@postgresql.org pg_database contents ... what happens Date: Sun, 30 May 2004 22:45:02 -0700 User-Agent: KMail/1.5.3 References: <011801c446ca$09b1c580$3410fea9@zoom> In-Reply-To: <011801c446ca$09b1c580$3410fea9@zoom> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline Message-Id: <200405302245.02687.uwe@oss4u.com> X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200405/335 X-Sequence-Number: 13651 -----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= =20 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=3D =3DWgMl -----END PGP SIGNATURE----- From arturp@plukwa.net Mon May 31 11:07:04 2004 X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id E5735D1B18F for ; Mon, 31 May 2004 08:07:04 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 51383-09 for ; Mon, 31 May 2004 08:07:04 -0300 (ADT) Received: from coruscant.plukwa.net (coruscant.plukwa.net [217.113.224.85]) by svr1.postgresql.org (Postfix) with ESMTP id 51418D1B1EC for ; Mon, 31 May 2004 08:06:45 -0300 (ADT) Received: from arturp by coruscant.plukwa.net with local (Exim 4.34) id 1BUkgk-0006F8-G7 for pgsql-admin@postgresql.org; Mon, 31 May 2004 13:10:53 +0200 Date: Mon, 31 May 2004 13:10:42 +0200 To: pgsql-admin@postgresql.org Message-ID: <20040531111042.GA2410@plukwa.net> References: <011801c446ca$09b1c580$3410fea9@zoom> <200405302245.02687.uwe@oss4u.com> Mime-Version: 1.0 Content-Disposition: inline In-Reply-To: <200405302245.02687.uwe@oss4u.com> User-Agent: Mutt/1.5.6i From: Artur P X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: arturp@plukwa.net Subject: Re: [admin]@postgresql.org pg_database contents ... what happens Content-Type: text/plain; charset=us-ascii X-SA-Exim-Version: 4.0 (built Sat, 24 Apr 2004 12:31:30 +0200) X-SA-Exim-Scanned: Yes (on coruscant.plukwa.net) X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200405/338 X-Sequence-Number: 13654 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