Re: wrong current schema in Search Objects dialog box

From: "J(dot)F(dot) Oster" <jinfroster(at)mail(dot)ru>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: Dmitriy Olshevskiy <olshevskiy87(at)bk(dot)ru>, pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: wrong current schema in Search Objects dialog box
Date: 2014-06-16 19:54:47
Message-ID: 27652485.20140616235447@mail.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hello,

Monday, June 16, 2014, 11:58:28 AM, Dave Page wrote:

DP> Do you have a few minutes to look at this please?

Sure!

DP> On Sun, Jun 15, 2014 at 7:30 PM, Dmitriy Olshevskiy <olshevskiy87(at)bk(dot)ru> wrote:

>> I applied this patch
>> http://git.postgresql.org/gitweb/?p=pgadmin3.git;a=commitdiff;h=010e38cdd4991feaf2e757e803d330dc6c5bdba6
>> and found that current schema is determined incorrectly when I select such
>> objects as Constraints, Indexes, Rules or Triggers (parts of any Table).
>> In this case combo-box contains item named "Current Schema (<table_name>)"
>> instead of "Current Schema (<schema_name>)".
...
>> Maybe here must be an additional check for an object's type (in first
>> condition) or there is a bug in the definition of schemas for object tree?

Dmitry, thanks for testing and reporting!
A surprise for me but really, GetSchema() for collections of indexes,
rules, constraints and triggers returns not <schema_name>, but
<table_name>. Some lines of code like
collection->GetSchema()->GetSchema()
speak well for a design consideration, not a bug.

Dave, please see the attached patch to workaround that.
It also includes minor fixes:
- Extend ORDER BY over 3-rd column (path)
- Dedublicate objects in results grid that have a match in several
search modes simultaneously.

--
Best regards,
J.F.

Attachment Content-Type Size
140616_searchobj_getschema.patch application/octet-stream 2.1 KB

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Timon 2014-06-17 06:05:53 Re: pgAdmin III commit: Modify the GNU build system so that it always rebui
Previous Message Dave Page 2014-06-16 07:58:28 Re: wrong current schema in Search Objects dialog box