Re: pgAdmin III commit: Revert the previous change that introduced sysSetti - Mailing list pgadmin-hackers

From Dave Page
Subject Re: pgAdmin III commit: Revert the previous change that introduced sysSetti
Date
Msg-id AANLkTi=vWdo5Eu+oY8NWJQD498qCFL1_3a6bvqRoZWJC@mail.gmail.com
Whole thread Raw
In response to Re: pgAdmin III commit: Revert the previous change that introduced sysSetti  (Peter Geoghegan <peter.geoghegan86@gmail.com>)
Responses Re: pgAdmin III commit: Revert the previous change that introduced sysSetti
List pgadmin-hackers
On Fri, Feb 18, 2011 at 2:47 PM, Peter Geoghegan
<peter.geoghegan86@gmail.com> wrote:
> On 17 February 2011 19:28, Dave Page <dpage@pgadmin.org> wrote:
>> No objections to that, but it does need to handle interoperability
>> with older versions too. IOW, it needs to read/write booleans as
>> REG_SZ values of "true" or "false", not REG_DWORDS. There may be other
>> gotchas too - that's the one I was hitting though.
>
> What about the Read() overloads? They currently work by passing a
> variable by reference (in the C sense, by pointer), to an overload of
> read. ISTM that it would be preferable to have variants with different
> names that return variables by value. What do you think?

I'm not sure that helps - the issue is that the current code reads the
string "true" and treats it as a boolean. What we need to do is ensure
we always write booleans as strings, otherwise it won't be backwards
compatible. Then, ReadBool() just reads a string value, and converts
it.

> By the way, this isn't that much trouble. I've already finished with
> the write() overloads. We're mostly using the inline wrapper functions
> in sysSettings.

OK.


--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

pgadmin-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: pgAdmin III commit: Revert the previous change that introduced sysSetti
Next
From: Dave Page
Date:
Subject: Re: pgAdmin III commit: Revert the previous change that introduced sysSetti