Unix Technical Forum

Re: Patch implementing "Allow the user to disconnect

This is a discussion on Re: Patch implementing "Allow the user to disconnect within the pgsql Interfaces Pgadmin Hackers forums, part of the PostgreSQL category; --> Milen A. Radev wrote: > Please review the attached patch. > > (Thanks to Petyo Milotinov for his invalueable ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Interfaces Pgadmin Hackers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-17-2008, 07:26 PM
Dave Page
 
Posts: n/a
Default Re: Patch implementing "Allow the user to disconnect

Milen A. Radev wrote:
> Please review the attached patch.
>
> (Thanks to Petyo Milotinov for his invalueable help)


Hi Milen,

This is an eyeball only review so far, but here's a few thoughts...

- pgDatabaseObject::CanDisconnect() doesn't seem to be used.

- frmMain::ReconnectDatabase() is obviously copied from
frmMain::ReconnectServer()... but is this the right code to use? If the
database state is just set back to disconnected, surely the existing
code can be used as if the user were connecting to the database for the
first time in the session?

- I'm not convinced that disconnectDatabaseFactory should be in
pgObject.cpp. Per the precedence set by disconnectServerFactory, it
should be in dlgDatabase.cpp (however, I'm not sure even that is right -
pgServer.cpp/pgDatabase.cpp would seem more sensible places for both).

- Commented out code such as:

+ //form->execSelChange(obj->GetId(), true);

should either have a comment explaining why it's commented out, or be
omitted from the patch altogether - otherwise, when we look at the code
in years to come we end up wondering why it's commented out!!

- What happens if the user disconnects from the maintenance database on
the server? Perhaps you intended pgDatabaseObject::CanDisconnect() to
return false in that case?

BTW, don't be put off by all those comments. You've jumped into one of
the more complex parts of the browser code :-)

Regards, Dave.

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 02:32 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com