Skip site navigation (1) Skip section navigation (2)

Re: wxWidgets 2.9 build

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Peter Geoghegan <peter(dot)geoghegan86(at)gmail(dot)com>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, Guillaume Lelarge <guillaume(at)lelarge(dot)info>, pgadmin-hackers(at)postgresql(dot)org
Subject: Re: wxWidgets 2.9 build
Date: 2011-01-24 08:41:32
Message-ID: AANLkTi=jzy=7tzYxFhY4G+esj76B9GVuH=aSTrRPgq8L@mail.gmail.com (view raw or flat)
Thread:
Lists: pgadmin-hackers
On Sun, Jan 23, 2011 at 4:01 PM, Peter Geoghegan
<peter(dot)geoghegan86(at)gmail(dot)com> wrote:
>
>> In principle I'm for incremental commits. Assuming the patch itself is
>> ok of course, I haven't actually reviewed anything :-)
>
> Okay, good.

Agreed. We're going to have to do this sooner or later, so let's make
it incremental and as easy to deal with as possible.

> By the way, I'm seeing lots of warnings like this:
>
> ./dlg/dlgSequence.cpp:114:6: warning: suggest explicit braces to avoid
> ambiguous ‘else’
>
> Worth fixing?

Yes, always - though I don't actually see a problem there in this
case. It looks pretty unambiguous to me (114 being the first line of
the else block):

        // Find, and disable the USAGE ACL option if we're on pre 8.2
        // 8.2+ only supports SELECT, UPDATE and USAGE
        if (!connection->BackendMinimumVersion(8, 2))
        {
                // Disable the checkbox
                if (!DisablePrivilege(wxT("USAGE")))
                        wxLogError(_("Failed to disable the USAGE
privilege checkbox!"));
        }
        else
        {
                if (!DisablePrivilege(wxT("INSERT")))
                        wxLogError(_("Failed to disable the INSERT
privilege checkbox!"));
                if (!DisablePrivilege(wxT("DELETE")))
                        wxLogError(_("Failed to disable the DELETE
privilege checkbox!"));
                if (!DisablePrivilege(wxT("RULE")))
                        wxLogError(_("Failed to disable the RULE
privilege checkbox!"));
                if (!DisablePrivilege(wxT("REFERENCES")))
                        wxLogError(_("Failed to disable the REFERENCES
privilege checkbox!"));
                if (!DisablePrivilege(wxT("TRIGGER")))
                        wxLogError(_("Failed to disable the TRIGGER
privilege checkbox!"));
        }



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

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

In response to

pgadmin-hackers by date

Next:From: Dave PageDate: 2011-01-24 08:43:06
Subject: Re: wxWidgets 2.9 build
Previous:From: Guillaume LelargeDate: 2011-01-23 22:25:18
Subject: Re: Support for Slony 2.0?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group