Re: Bug report: OIDs, roles and Windows (signedness issue?)

From: Ian Lawrence Barwick <barwick(at)gmail(dot)com>
To: Ashesh Vashi <ashesh(dot)vashi(at)enterprisedb(dot)com>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: Bug report: OIDs, roles and Windows (signedness issue?)
Date: 2013-11-22 07:47:29
Message-ID: CAB8KJ=jE6CkQou-PuvQOS6mY5h6aRhAkhwf+TQH3GD_y7xQ5Mw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

2013/11/22 Ian Lawrence Barwick <barwick(at)gmail(dot)com>:
>
> 2013/11/22 Ashesh Vashi <ashesh(dot)vashi(at)enterprisedb(dot)com>
>>
>> On Fri, Nov 22, 2013 at 12:40 PM, Ian Lawrence Barwick <barwick(at)gmail(dot)com>
>> wrote:
>>>
>>> Hi
>>>
>>> On Windows, if a user role's OID exceeds 256^4/2 - 1 (aka 2147483647),
>>> the OID is displayed as 2147483647 and additional information for that
>>> object
>>> (e.g. ACL information) is not displayed.
>>>
>>> We have verified this happens with pgAdmin3 1.16.0 on Windows 7 and
>>> 1.18.1 on Windows 2012 server. It does not happen on Linux (1.16.1),
>>> where
>>> the OID (FWIW, it's 3794942497) for the role in question displays
>>> correctly as
>>> well as the ACL information.
>>
>> Is it linux (32 bit or 64 bit)?
>
>
> Both Windows and Linux are 64 bit.
>
> BTW other objects (tables, schemas etc.) with OIDs greater than 256^4/2 - 1
> don't seem to be affected by this.

It's been a while since I've looked at the pgAdmin source, but some wild
grepping shows that in:

pgadmin/schema/pgRole.cpp

the role OID is set with:

role->iSetOid(roles->GetLong(wxT("oid")));

whereas almost everywhere else it's set with GetOid(), e.g.

table->iSetOid(tables->GetOid(wxT("oid")));

which may or may not have something to do with the issue.

Regards

Ian Barwick

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Ian Lawrence Barwick 2013-11-22 08:06:34 Re: Bug report: OIDs, roles and Windows (signedness issue?)
Previous Message Ian Lawrence Barwick 2013-11-22 07:26:16 Re: Bug report: OIDs, roles and Windows (signedness issue?)