Re: PATCH: Encoding issue with qtLiteral function (pgAdmin4)

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Murtuza Zabuawala <murtuza(dot)zabuawala(at)enterprisedb(dot)com>, pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: PATCH: Encoding issue with qtLiteral function (pgAdmin4)
Date: 2016-08-01 14:24:19
Message-ID: CA+OCxozJCntCRBnDY0vyUM86sWeYn5id6SQxZZ=_RS6NhNRrLA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

On Mon, Aug 1, 2016 at 2:53 PM, Murtuza Zabuawala
<murtuza(dot)zabuawala(at)enterprisedb(dot)com> wrote:
> Yes... :-)

OK, committed with the following:

# If schema is public, prefix it. Otherwise, we should
already have it.
if row['nspname'] == 'public':
rtn_type = "public." + row['typname']
else:
rtn_type = row['typname']

> On Mon, Aug 1, 2016 at 7:16 PM, Dave Page <dpage(at)pgadmin(dot)org> wrote:
>>
>> On Mon, Aug 1, 2016 at 2:33 PM, Murtuza Zabuawala
>> <murtuza(dot)zabuawala(at)enterprisedb(dot)com> wrote:
>> > Hi Dave,
>> >
>> > We have to added it because postgres format_type() function do not
>> > provide
>> > us type with 'public' schema prefix to it, due to which wrong SQL's are
>> > getting generated.
>> > Rest other types are pre fixed with their respective schema as required.
>>
>> OK, so:
>>
>> # If schema is not pg_catalog & then add schema
>> if row['nspname'] == 'public':
>> rtn_type = row['nspname'] + "." + row['typname']
>> else:
>> rtn_type = row['typname']
>>
>> ?
>>
>> != pg_catalog is redundant with == public.
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>
>

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

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

In response to

Browse pgadmin-hackers by date

  From Date Subject
Next Message Ashesh Vashi 2016-08-02 04:09:03 pgAdmin 4 commit: Allow to create the foreign table with inherits optio
Previous Message Dave Page 2016-08-01 14:23:11 pgAdmin 4 commit: Further misc quoting/encoding related fixes.