Re: PATCH: Encoding issue with qtLiteral function (pgAdmin4) - Mailing list pgadmin-hackers

From Murtuza Zabuawala
Subject Re: PATCH: Encoding issue with qtLiteral function (pgAdmin4)
Date
Msg-id CAKKotZQ+-zCKvohhg0C-n+SE2dX3Y1d+KhHEWudcck86Jrx3Hw@mail.gmail.com
Whole thread Raw
In response to Re: PATCH: Encoding issue with qtLiteral function (pgAdmin4)  (Dave Page <dpage@pgadmin.org>)
Responses Re: PATCH: Encoding issue with qtLiteral function (pgAdmin4)  (Dave Page <dpage@pgadmin.org>)
List pgadmin-hackers
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.


Thanks,
Murtuza 


--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


On Mon, Aug 1, 2016 at 6:51 PM, Dave Page <dpage@pgadmin.org> wrote:
Hi

On Thu, Jul 28, 2016 at 10:56 AM, Murtuza Zabuawala
<murtuza.zabuawala@enterprisedb.com> wrote:
> Hi Dave,
>
> PFA updated patch to fix issue in functions which was due to improper
> handing of nested quoting of types in templates.
> I also fixed it in Table/Column node.
>
> Please review.

This doesn't seem right to me:

                # If schema is not pg_catalog & then add schema
                if row['nspname'] != 'pg_catalog' \
                        and row['nspname'] == 'public':
                    rtn_type = row['nspname'] + "." + row['typname']
                else:
                    rtn_type = row['typname']

Shouldn't the "and row['nspname'] == 'public'" be removed?

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

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

pgadmin-hackers by date:

Previous
From: Dave Page
Date:
Subject: Re: [pgAdmin4][patch]: fix double hyphen duplication in the SQL tab
Next
From: Dave Page
Date:
Subject: Re: PATCH: Encoding issue with qtLiteral function (pgAdmin4)