Re: [GENERAL] pgAdmin3 question

2006-04-08 Thread Dave Page
 

> -Original Message-
> From: lmyho [mailto:[EMAIL PROTECTED] 
> Sent: 07 April 2006 22:31
> To: Dave Page; pgsql-general@postgresql.org
> Subject: RE: [GENERAL] pgAdmin3 question
> 
> 
> --- Dave Page  wrote:
> 
> > > We have test database created in the initdb cluster, but 
> on the Add 
> > > Server page
> > of
> > > pgAdmin3, the Maintenance DB dropdown box does not show this 
> > > database.  How can
> > we
> > > make it to display this db in the dropdown box too?  
> > 
> > You can't without hacking the code. 
> 
> How to do this?

Add the required lines to the dlgServer constructor in
src/dlg/dlgServer.cpp, then recompile pgAdmin, eg.

cbDatabase->Append(wxT("postgres"));
cbDatabase->Append(wxT("template1"));

// Add additional database options
cbDatabase->Append(wxT("research"));
cbDatabase->Append(wxT("sales"));

Regards, Dave.

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [GENERAL] pgAdmin3 question

2006-04-08 Thread User Roman
# [EMAIL PROTECTED] / 2006-04-07 14:31:04 -0700:
> A further question: we are using Debian system.  So when we leave the 
> 'Address' box
> blank (on the Add Server page of pgAdmin), according to the help file, it 
> will go to
> use the default Postgresql socket on the local machine. 
>  We actually have a line as 'local all all   ident sameuser' in the 
> pg_hba.conf
> file.  But when I tried, pgAdmin couldn't log the user in and shows "Ident
> Authentication Failed".  Then I modified the line pg_hba.conf file to 'local 
> all all
>  ident', and aaded a map line in the pg_ident.conf file to map the new user 
> to user
> 'postgres'.  Still not work.

Did you instruct postmaster to reread the config files?

 
http://www.postgresql.org/docs/8.1/static/client-authentication.html#AUTH-PG-HBA-CONF

 The pg_hba.conf file is read on start-up and when the main server
 process (postmaster) receives a SIGHUP signal. If you edit the file
 on an active system, you will need to signal the postmaster (using
 pg_ctl reload or kill -HUP) to make it re-read the file.

http://www.postgresql.org/docs/8.1/static/auth-methods.html#AUTH-IDENT

 The pg_ident.conf file is read on start-up and when the main server
 process (postmaster) receives a SIGHUP signal. If you edit the file
 on an active system, you will need to signal the postmaster (using
 pg_ctl reload or kill -HUP) to make it re-read the file.

-- 
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE. http://bash.org/?255991

---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


Re: [GENERAL] pgAdmin3 question

2006-04-07 Thread lmyho

--- Dave Page  wrote:

> > We have test database created in the initdb cluster, but on the Add Server 
> > page
> of
> > pgAdmin3, the Maintenance DB dropdown box does not show this database.  How 
> > can
> we
> > make it to display this db in the dropdown box too?  
> 
> You can't without hacking the code. 

How to do this?

> > As the Maintenance DB dropdown box doesn't show this test db, we have to 
> > allow
> the
> > owner of this test db (a new user created for this test db only) to access 
> > 'all'
> > database in the pg_hba.conf file in order to allow it to login through 
> > pgAdmin.
> And
> > once loged in, it of course has access to all databases including the 
> > postgres. 
> How
> > can we control this situation through pgAdmin?
> 
> No, you don't have to allow access to all databases. You can type the name of 
> the
> preferred maintenance DB, 

Yea! Worked by typing the new db name!  Sorry didn't notice that we can type a 
name
into the dropdown box.:(

Thank you!

A further question: we are using Debian system.  So when we leave the 'Address' 
box
blank (on the Add Server page of pgAdmin), according to the help file, it will 
go to
use the default Postgresql socket on the local machine. 
 We actually have a line as 'local all all   ident sameuser' in the pg_hba.conf
file.  But when I tried, pgAdmin couldn't log the user in and shows "Ident
Authentication Failed".  Then I modified the line pg_hba.conf file to 'local 
all all
 ident', and aaded a map line in the pg_ident.conf file to map the new user to 
user
'postgres'.  Still not work.

What has I done wrong?  Or how should I use the "ident" authen way through 
pgAdmin?

Thank you for your help!!

regards,
leo

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq


Re: [GENERAL] pgAdmin3 question

2006-04-07 Thread Dave Page


> We have test database created in the initdb cluster, but on the Add Server 
> page of
> pgAdmin3, the Maintenance DB dropdown box does not show this database.  How 
> can we
> make it to display this db in the dropdown box too?  

You can't without hacking the code. Those databases are just helpful defaults.

> As the Maintenance DB dropdown box doesn't show this test db, we have to 
> allow the
> owner of this test db (a new user created for this test db only) to access 
> 'all'
> database in the pg_hba.conf file in order to allow it to login through 
> pgAdmin. And
> once loged in, it of course has access to all databases including the 
> postgres.  How
> can we control this situation through pgAdmin?

No, you don't have to allow access to all databases. You can type the name of 
the preferred maintenance DB, or grant the user access to 'postgres' as well as 
any other databases they need. 'postgres' is intended for this sort of use...

Regards, Dave

-Unmodified Original Message-
Hi All,

Have a question on pgAdmin3:

We have test database created in the initdb cluster, but on the Add Server page 
of
pgAdmin3, the Maintenance DB dropdown box does not show this database.  How can 
we
make it to display this db in the dropdown box too?  

As the Maintenance DB dropdown box doesn't show this test db, we have to allow 
the
owner of this test db (a new user created for this test db only) to access 'all'
database in the pg_hba.conf file in order to allow it to login through pgAdmin. 
And
once loged in, it of course has access to all databases including the postgres. 
 How
can we control this situation through pgAdmin?

Any help would be greatly appreciated.

Thanks,
leo

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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

---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org


[GENERAL] pgAdmin3 question

2006-04-07 Thread lmyho
Hi All,

Have a question on pgAdmin3:

We have test database created in the initdb cluster, but on the Add Server page 
of
pgAdmin3, the Maintenance DB dropdown box does not show this database.  How can 
we
make it to display this db in the dropdown box too?  

As the Maintenance DB dropdown box doesn't show this test db, we have to allow 
the
owner of this test db (a new user created for this test db only) to access 'all'
database in the pg_hba.conf file in order to allow it to login through pgAdmin. 
And
once loged in, it of course has access to all databases including the postgres. 
 How
can we control this situation through pgAdmin?

Any help would be greatly appreciated.

Thanks,
leo

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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