Thread: Bug report: OIDs, roles and Windows (signedness issue?)
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. Please let me know if you need any more details. Regards Ian Barwick
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.
Please let me know if you need any more details.
Regards
Ian Barwick
--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
--
Thanks & Regards,
Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
On Fri, Nov 22, 2013 at 12:40 PM, Ian Lawrence Barwick <barwick@gmail.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)?
2013/11/22 Ian Lawrence Barwick <barwick@gmail.com>: > > 2013/11/22 Ashesh Vashi <ashesh.vashi@enterprisedb.com> >> >> On Fri, Nov 22, 2013 at 12:40 PM, Ian Lawrence Barwick <barwick@gmail.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
2013/11/22 Ian Lawrence Barwick <barwick@gmail.com>: >> >> 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. If that is the problem, then here's a patch. Untested as I don't have a Windows build environment available, though I might be able to cobble one together next week. Regards Ian Barwick
Attachment
2013/11/22 Ian Lawrence Barwick <barwick@gmail.com>: > 2013/11/22 Ian Lawrence Barwick <barwick@gmail.com>: > >>> >>> 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. > > If that is the problem, then here's a patch. Untested as I don't have a Windows > build environment available, though I might be able to cobble one together > next week. Just wondering - has anyone been able to look into this? Unfortunately I still don't have a Windows build environment available to test. Regards Ian Barwick
Just wondering - has anyone been able to look into this? Unfortunately I still2013/11/22 Ian Lawrence Barwick <barwick@gmail.com>:
> 2013/11/22 Ian Lawrence Barwick <barwick@gmail.com>:
>
>>>
>>> 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.
>
> If that is the problem, then here's a patch. Untested as I don't have a Windows
> build environment available, though I might be able to cobble one together
> next week.
don't have a Windows build environment available to test.
Regards
Ian Barwick
--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
--
--
Thanks & Regards,
Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
Thanks for the reminder.Sorry - it was missed due to busy schedule.I will take a look at it.
Ian Barwick
On Fri, Jan 10, 2014 at 1:36 PM, Ian Lawrence Barwick <barwick@gmail.com> wrote:Just wondering - has anyone been able to look into this? Unfortunately I still2013/11/22 Ian Lawrence Barwick <barwick@gmail.com>:
> 2013/11/22 Ian Lawrence Barwick <barwick@gmail.com>:
>
>>>
>>> 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.
>
> If that is the problem, then here's a patch. Untested as I don't have a Windows
> build environment available, though I might be able to cobble one together
> next week.
don't have a Windows build environment available to test.
Regards
Ian Barwick--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
2014/1/10 Ashesh Vashi <ashesh.vashi@enterprisedb.com>Thanks for the reminder.Sorry - it was missed due to busy schedule.I will take a look at it.No worries, thanks for replying so quickly.Regards
Ian Barwick
On Fri, Jan 10, 2014 at 1:36 PM, Ian Lawrence Barwick <barwick@gmail.com> wrote:Just wondering - has anyone been able to look into this? Unfortunately I still2013/11/22 Ian Lawrence Barwick <barwick@gmail.com>:
> 2013/11/22 Ian Lawrence Barwick <barwick@gmail.com>:
>
>>>
>>> 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.
>
> If that is the problem, then here's a patch. Untested as I don't have a Windows
> build environment available, though I might be able to cobble one together
> next week.
don't have a Windows build environment available to test.
Regards
Ian Barwick--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
--
--
Thanks & Regards,
Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
Attachment
Dave,The patch, sent by Ian Lawrence, looks good me.I also found some other places, where the similar changes were required (specially in debugger code).I've attached the combined patch (debugger changes and Ian's patch).If nobody has any objection, I will check-in the patch on both REL-1_18_0_PATCHES and master branch.On Fri, Jan 10, 2014 at 2:11 PM, Ian Lawrence Barwick <barwick@gmail.com> wrote:2014/1/10 Ashesh Vashi <ashesh.vashi@enterprisedb.com>Thanks for the reminder.Sorry - it was missed due to busy schedule.I will take a look at it.No worries, thanks for replying so quickly.Regards
Ian Barwick
On Fri, Jan 10, 2014 at 1:36 PM, Ian Lawrence Barwick <barwick@gmail.com> wrote:Just wondering - has anyone been able to look into this? Unfortunately I still2013/11/22 Ian Lawrence Barwick <barwick@gmail.com>:
> 2013/11/22 Ian Lawrence Barwick <barwick@gmail.com>:
>
>>>
>>> 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.
>
> If that is the problem, then here's a patch. Untested as I don't have a Windows
> build environment available, though I might be able to cobble one together
> next week.
don't have a Windows build environment available to test.
Regards
Ian Barwick--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
--
--Thanks & Regards,
Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
Thanks for the update .RegardsIan Barwick2014-02-05 Ashesh Vashi <ashesh.vashi@enterprisedb.com>:Dave,The patch, sent by Ian Lawrence, looks good me.I also found some other places, where the similar changes were required (specially in debugger code).I've attached the combined patch (debugger changes and Ian's patch).If nobody has any objection, I will check-in the patch on both REL-1_18_0_PATCHES and master branch.On Fri, Jan 10, 2014 at 2:11 PM, Ian Lawrence Barwick <barwick@gmail.com> wrote:2014/1/10 Ashesh Vashi <ashesh.vashi@enterprisedb.com>Thanks for the reminder.Sorry - it was missed due to busy schedule.I will take a look at it.No worries, thanks for replying so quickly.Regards
Ian Barwick
On Fri, Jan 10, 2014 at 1:36 PM, Ian Lawrence Barwick <barwick@gmail.com> wrote:Just wondering - has anyone been able to look into this? Unfortunately I still2013/11/22 Ian Lawrence Barwick <barwick@gmail.com>:
> 2013/11/22 Ian Lawrence Barwick <barwick@gmail.com>:
>
>>>
>>> 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.
>
> If that is the problem, then here's a patch. Untested as I don't have a Windows
> build environment available, though I might be able to cobble one together
> next week.
don't have a Windows build environment available to test.
Regards
Ian Barwick--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
--
--Thanks & Regards,
Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
Just wondering - is anything happening with this patch?
RegardsIan Barwick2014-02-05 19:02 GMT+09:00 Ian Lawrence Barwick <barwick@gmail.com>:Thanks for the update .RegardsIan Barwick2014-02-05 Ashesh Vashi <ashesh.vashi@enterprisedb.com>:Dave,The patch, sent by Ian Lawrence, looks good me.I also found some other places, where the similar changes were required (specially in debugger code).I've attached the combined patch (debugger changes and Ian's patch).If nobody has any objection, I will check-in the patch on both REL-1_18_0_PATCHES and master branch.On Fri, Jan 10, 2014 at 2:11 PM, Ian Lawrence Barwick <barwick@gmail.com> wrote:2014/1/10 Ashesh Vashi <ashesh.vashi@enterprisedb.com>Thanks for the reminder.Sorry - it was missed due to busy schedule.I will take a look at it.No worries, thanks for replying so quickly.Regards
Ian Barwick
On Fri, Jan 10, 2014 at 1:36 PM, Ian Lawrence Barwick <barwick@gmail.com> wrote:Just wondering - has anyone been able to look into this? Unfortunately I still2013/11/22 Ian Lawrence Barwick <barwick@gmail.com>:
> 2013/11/22 Ian Lawrence Barwick <barwick@gmail.com>:
>
>>>
>>> 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.
>
> If that is the problem, then here's a patch. Untested as I don't have a Windows
> build environment available, though I might be able to cobble one together
> next week.
don't have a Windows build environment available to test.
Regards
Ian Barwick--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
--
--Thanks & Regards,
Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
--
--
Thanks & Regards,
Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
Checked-in in the master and REL-1_18_0_PATCHES branch.
On Wed, Feb 26, 2014 at 4:28 AM, Ian Lawrence Barwick <barwick@gmail.com> wrote:Just wondering - is anything happening with this patch?I was waiting for other hackers for their response.I will check-in the patch as nobody objected.Thanks for the reminder though.RegardsIan Barwick2014-02-05 19:02 GMT+09:00 Ian Lawrence Barwick <barwick@gmail.com>:Thanks for the update .RegardsIan Barwick2014-02-05 Ashesh Vashi <ashesh.vashi@enterprisedb.com>:Dave,The patch, sent by Ian Lawrence, looks good me.I also found some other places, where the similar changes were required (specially in debugger code).I've attached the combined patch (debugger changes and Ian's patch).If nobody has any objection, I will check-in the patch on both REL-1_18_0_PATCHES and master branch.On Fri, Jan 10, 2014 at 2:11 PM, Ian Lawrence Barwick <barwick@gmail.com> wrote:2014/1/10 Ashesh Vashi <ashesh.vashi@enterprisedb.com>Thanks for the reminder.Sorry - it was missed due to busy schedule.I will take a look at it.No worries, thanks for replying so quickly.Regards
Ian Barwick
On Fri, Jan 10, 2014 at 1:36 PM, Ian Lawrence Barwick <barwick@gmail.com> wrote:Just wondering - has anyone been able to look into this? Unfortunately I still2013/11/22 Ian Lawrence Barwick <barwick@gmail.com>:
> 2013/11/22 Ian Lawrence Barwick <barwick@gmail.com>:
>
>>>
>>> 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.
>
> If that is the problem, then here's a patch. Untested as I don't have a Windows
> build environment available, though I might be able to cobble one together
> next week.
don't have a Windows build environment available to test.
Regards
Ian Barwick--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
--
--Thanks & Regards,
Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
--
--
Thanks & Regards,
Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
Done.
Checked-in in the master and REL-1_18_0_PATCHES branch.
verify it in the environment where the issue occurred.
Regards
Ian Barwick
On Wed, Feb 26, 2014 at 9:42 AM, Ashesh Vashi <ashesh.vashi@enterprisedb.com> wrote:On Wed, Feb 26, 2014 at 4:28 AM, Ian Lawrence Barwick <barwick@gmail.com> wrote:Just wondering - is anything happening with this patch?I was waiting for other hackers for their response.I will check-in the patch as nobody objected.Thanks for the reminder though.RegardsIan Barwick2014-02-05 19:02 GMT+09:00 Ian Lawrence Barwick <barwick@gmail.com>:Thanks for the update .RegardsIan Barwick2014-02-05 Ashesh Vashi <ashesh.vashi@enterprisedb.com>:Dave,The patch, sent by Ian Lawrence, looks good me.I also found some other places, where the similar changes were required (specially in debugger code).I've attached the combined patch (debugger changes and Ian's patch).If nobody has any objection, I will check-in the patch on both REL-1_18_0_PATCHES and master branch.On Fri, Jan 10, 2014 at 2:11 PM, Ian Lawrence Barwick <barwick@gmail.com> wrote:2014/1/10 Ashesh Vashi <ashesh.vashi@enterprisedb.com>Thanks for the reminder.Sorry - it was missed due to busy schedule.I will take a look at it.No worries, thanks for replying so quickly.Regards
Ian Barwick
On Fri, Jan 10, 2014 at 1:36 PM, Ian Lawrence Barwick <barwick@gmail.com> wrote:Just wondering - has anyone been able to look into this? Unfortunately I still2013/11/22 Ian Lawrence Barwick <barwick@gmail.com>:
> 2013/11/22 Ian Lawrence Barwick <barwick@gmail.com>:
>
>>>
>>> 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.
>
> If that is the problem, then here's a patch. Untested as I don't have a Windows
> build environment available, though I might be able to cobble one together
> next week.
don't have a Windows build environment available to test.
Regards
Ian Barwick--
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
--
--Thanks & Regards,
Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
--
--Thanks & Regards,
Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company