public inbox for [email protected]
help / color / mirror / Atom feedPATCH: Minor patch to fix 'qtLiteral' function in pgAdmin4
2+ messages / 2 participants
[nested] [flat]
* PATCH: Minor patch to fix 'qtLiteral' function in pgAdmin4
@ 2016-01-05 13:55 Murtuza Zabuawala <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: Murtuza Zabuawala @ 2016-01-05 13:55 UTC (permalink / raw)
To: pgadmin-hackers
Hi,
Please find minor patch to fix 'qtLiteral' function in pgAdmin4.
_Issue:_
'qtLiteral' functions returns in 'bytes' but we need to convert it in
string for Python3.
Regards,
Murtuza Zabuawala
--
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
Attachments:
[text/x-patch] fixed_qtLiteral.patch (670B, 3-fixed_qtLiteral.patch)
download | inline diff:
diff --git a/web/pgadmin/utils/driver/psycopg2/__init__.py b/web/pgadmin/utils/driver/psycopg2/__init__.py
index f5346ba..c24cb77 100644
--- a/web/pgadmin/utils/driver/psycopg2/__init__.py
+++ b/web/pgadmin/utils/driver/psycopg2/__init__.py
@@ -760,7 +760,12 @@ class Driver(BaseDriver):
@staticmethod
def qtLiteral(value):
- return adapt(value).getquoted()
+ # Returns in bytes, we need to convert it in string
+ if isinstance(adapt(value).getquoted(), bytes):
+ return adapt(value).getquoted().decode()
+ else:
+ return adapt(value).getquoted()
+
@staticmethod
def ScanKeywordExtraLookup(key):
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: PATCH: Minor patch to fix 'qtLiteral' function in pgAdmin4
@ 2016-01-07 14:04 Ashesh Vashi <[email protected]>
parent: Murtuza Zabuawala <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Ashesh Vashi @ 2016-01-07 14:04 UTC (permalink / raw)
To: Murtuza Zabuawala <[email protected]>; +Cc: pgadmin-hackers
Done with small changes.
--
Thanks & Regards,
Ashesh Vashi
EnterpriseDB INDIA: Enterprise PostgreSQL Company
<http://www.enterprisedb.com;
*http://www.linkedin.com/in/asheshvashi*
<http://www.linkedin.com/in/asheshvashi;
On Tue, Jan 5, 2016 at 7:25 PM, Murtuza Zabuawala <
[email protected]> wrote:
> Hi,
>
> Please find minor patch to fix 'qtLiteral' function in pgAdmin4.
>
> *Issue:*
> 'qtLiteral' functions returns in 'bytes' but we need to convert it in
> string for Python3.
>
>
> Regards,
> Murtuza Zabuawala
>
>
> --
> Sent via pgadmin-hackers mailing list ([email protected])
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>
>
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2016-01-07 14:04 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-01-05 13:55 PATCH: Minor patch to fix 'qtLiteral' function in pgAdmin4 Murtuza Zabuawala <[email protected]>
2016-01-07 14:04 ` Ashesh Vashi <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox