From: | Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com> |
---|---|
To: | pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org> |
Subject: | Re: Observed issue in pgAdmin3 while creating Type object |
Date: | 2016-01-28 09:34:15 |
Message-ID: | CANxoLDfLtc1gkkhq8yckw9p3O6CUS4yaH704LRTX9de+koafLQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-hackers |
Hi Dave
To fix this I have used "qtTypeIdent" instead of "qtIdent". I have found
one more issue, in case of Edit mode options related to Range information
has not been populated for existing Type, the problem here is as per the
wxWidget documentation for a combobox with wxCB_READONLY style the string
must be in the combobox list, otherwise the call to SetValue() is ignored.
To fix this instead of using "SetValue()" I have used "Append" method and
also disable all the controls in case of Edit mode as user can't change it.
Attached is the patch file to fix this issue
On Thu, Jan 28, 2016 at 8:03 AM, Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com
> wrote:
> Sure I'll check.
> On 27-Jan-2016 8:36 pm, "Dave Page" <dave(dot)page(at)enterprisedb(dot)com> wrote:
>
>> Hi,
>>
>> I'm travelling at the moment, and don't have a pgAdmin 3 build
>> environment (or VMware) on the machine I brought with me. Akshay - can
>> you help out please? We should figure out the correct behaviour for
>> pgAdmin 4, and fix pgAdmin 3 as we go.
>>
>> Thanks!
>>
>> On Wed, Jan 27, 2016 at 6:14 AM, Murtuza Zabuawala
>> <murtuza(dot)zabuawala(at)enterprisedb(dot)com> wrote:
>> > Hi Dave,
>> >
>> > I am trying to create new type, while doing so I observed an issue,
>> which
>> > I'm not sure if it is correct or not.
>> >
>> > Steps to re-produce the issue:
>> > 1) Create New Type
>> > 2) Go to Type Tab, Select type "Range"
>> > 3) Go to Definition Tab:
>> > - When we select Subtype: "Bit" (Actually it's bit only if we look in
>> actual
>> > query output but before adding into combo box we apply qtIdent function
>> in
>> > c++ side hence we get double quotes in cobmo box)
>> >
>> > In the background it ran another query to fill up "Subtype operator
>> class"
>> > combo box as below,
>> >
>> > [Debug query from C++ code]
>> > #### Subtype operator class query: SELECT opc.opcname, opc.opcintype
>> > FROM pg_opclass opc
>> > JOIN pg_type typ ON opc.opcintype=typ.oid AND typ.typname='"bit"'
>> > WHERE opc.opcmethod=403
>> > ORDER BY opcname
>> >
>> > Now the issue is that it added double quotes in query also causing no
>> output
>> > from query but if remove the double quote and run the query again we get
>> > opcname and opcinttype for bit subtype from query,
>> >
>> > From the above "Subtype operator class" query we use opc.opcintype
>> > (subtypeoid) to fill Subtype diff function combo box, but as we did
>> not get
>> > any result from above query, it generated below query and wrong output
>> which
>> > is same for every subtype selected from combo box which has double
>> quotes.
>> >
>> > Actual C++ code (dlgType.cpp:741)
>> > set = connection->ExecuteSet(
>> > wxT("SELECT proname, nspname\n")
>> > wxT(" FROM pg_proc\n")
>> > wxT(" JOIN pg_namespace n ON n.oid=pronamespace\n")
>> > wxT(" WHERE prorettype=701 ")
>> > wxT(" AND proargtypes='") + subtypeoid + wxT(" ") +
>> > subtypeoid + wxT("'\n")
>> > wxT(" ORDER BY proname\n"));
>> >
>> >
>> > [Debug query from C++ code]
>> > ##### Subtype diff function query: SELECT proname, nspname
>> > FROM pg_proc
>> > JOIN pg_namespace n ON n.oid=pronamespace
>> > WHERE prorettype=701 AND proargtypes=' '
>> > ORDER BY proname
>> >
>> >
>> > Can you please confirm this behavior, so that I can proceed in pgAdmin4?
>> >
>> >
>> > Regards,
>> > Murtuza
>>
>>
>>
>> --
>> Dave Page
>> VP, Chief Architect, Tools & Installers
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>
--
*Akshay Joshi*
*Principal Software Engineer *
*Phone: +91 20-3058-9517Mobile: +91 976-788-8246*
Attachment | Content-Type | Size |
---|---|---|
Type.patch | application/octet-stream | 1.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Sanket Mehta | 2016-01-28 13:51:37 | PATCH: PGADMIN 4 - FTS templates node |
Previous Message | Dave Page | 2016-01-27 15:00:24 | Re: python 2.6 support [pgAdmin4] |