Обсуждение: Server discovery
Hi Dave, I'm a bit unhappy about the current server discovery feature. First of all, on machines without pgsql wx will barf about a missing registry key with a message box, quite ugly. Second, the generated server info can't be edited. Well, currently this isn't possible for manual entered servers either without registry editing, but we should change that anyway: there's no reason why we don't have a dlgServer.cpp except for "it's not done". My thought was to push the service information into pgadmin registry values when installing, so the settings can be adjusted later. Regards, Andreas
-----Original Message----- From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] Sent: Tue 8/3/2004 11:50 AM To: Dave Page Cc: pgadmin-hackers@postgresql.org Subject: Server discovery > I'm a bit unhappy about the current server discovery feature. > First of all, on machines without pgsql wx will barf about a missing > registry key with a message box, quite ugly. Ack, didn't think of that. Will fix. > Second, the generated server info can't be edited. Well, currently this > isn't possible for manual entered servers either without registry > editing, but we should change that anyway: there's no reason why we > don't have a dlgServer.cpp except for "it's not done". Yup, was going to do that tonight. I was intending to add keys as I've done for lastdb and lastschema that can be editted,at least using regedit initially. Such servers will retain their config, but remain 'auto-discovered' at each startup. > My thought was to push the service information into pgadmin registry > values when installing, so the settings can be adjusted later. Yup... /D
Dave Page wrote: > >>Second, the generated server info can't be edited. Well, currently this >>isn't possible for manual entered servers either without registry >>editing, but we should change that anyway: there's no reason why we >>don't have a dlgServer.cpp except for "it's not done". > > > Yup, was going to do that tonight. I was intending to add keys as I've done for lastdb and lastschema that can be editted,at least using regedit initially. Such servers will retain their config, but remain 'auto-discovered' at each startup. That means additional/different keys? If the services is rediscovered every time, how will you distinguish them from the same server entered manually? Autodiscovery on every startup might result in annoyingly popping up servers you already changed manually to your needs. This seems undesirable. Regards, Andreas
> -----Original Message----- > From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] > Sent: 03 August 2004 13:05 > To: Dave Page > Cc: pgadmin-hackers@postgresql.org > Subject: Re: [pgadmin-hackers] Server discovery > > That means additional/different keys? > If the services is rediscovered every time, how will you > distinguish them from the same server entered manually? > > Autodiscovery on every startup might result in annoyingly > popping up servers you already changed manually to your > needs. This seems undesirable. Absolutely. I already did this for LastDatabase and LastSchema, which instead of being stored as HKCU\Software\pgAdmin III\Servers\LastSchemaNN as they are for manually added servers, are stored as HKCU\Software\pgAdmin III\Servers\LastSchema-XXXX, where XXXX is the short name of the installed service. That way, as long as the user doesn't change the name of the service, the changed values will get re-attached at the next startup. I'm toying with adding the hostname into the mix as well, just to prevent possible mixups wth roaming pofiles. Not sure how likely that scenario is, but I guess it won't hurt. Regards, Dave.
Dave Page wrote: > > > >>-----Original Message----- >>From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] >>Sent: 03 August 2004 13:05 >>To: Dave Page >>Cc: pgadmin-hackers@postgresql.org >>Subject: Re: [pgadmin-hackers] Server discovery >> >>That means additional/different keys? >>If the services is rediscovered every time, how will you >>distinguish them from the same server entered manually? >> >>Autodiscovery on every startup might result in annoyingly >>popping up servers you already changed manually to your >>needs. This seems undesirable. > > > Absolutely. I already did this for LastDatabase and LastSchema, which > instead of being stored as HKCU\Software\pgAdmin > III\Servers\LastSchemaNN as they are for manually added servers, are > stored as HKCU\Software\pgAdmin III\Servers\LastSchema-XXXX, where XXXX > is the short name of the installed service. That way, as long as the > user doesn't change the name of the service, the changed values will get > re-attached at the next startup. > > I'm toying with adding the hostname into the mix as well, just to > prevent possible mixups wth roaming pofiles. Not sure how likely that > scenario is, but I guess it won't hurt. Frankly, this appears overdesigned to me. Why not just adding discovered servers at installation time? Regards, Andreas
> -----Original Message----- > From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] > Sent: 03 August 2004 23:20 > To: Dave Page > Cc: pgadmin-hackers@postgresql.org > Subject: Re: [pgadmin-hackers] Server discovery > > > Frankly, this appears overdesigned to me. > Why not just adding discovered servers at installation time? Because that involves venturing into the realms of MSI custom actions (which can be a pita) and won't work for those of us that use snapshots. Besides, the code is quite simple and is done now (with hostnames to void roaming profile originating confusion). Regards, Dave.