public inbox for [email protected]
help / color / mirror / Atom feedFrom: Murtuza Zabuawala <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: PATCH: handling of range types (pgAdmin4)
Date: Tue, 6 Sep 2016 18:27:55 +0530
Message-ID: <CAKKotZSQfKQn9dfVRqOojqTF2jb460CekF_9VjNLrf0zWJqjjA@mail.gmail.com> (raw)
List-Unsubscribe: <mailto:[email protected]?body=unsub%20pgadmin-hackers>
Hi,
PFA patch to add range type support in pgAdmin4.
RM#1658
Please review.
--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
--
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
Attachments:
[application/octet-stream] RM_1658.patch (701B, 3-RM_1658.patch)
download | inline diff:
diff --git a/web/pgadmin/utils/driver/psycopg2/__init__.py b/web/pgadmin/utils/driver/psycopg2/__init__.py
index e3a9e96..b11a0de 100644
--- a/web/pgadmin/utils/driver/psycopg2/__init__.py
+++ b/web/pgadmin/utils/driver/psycopg2/__init__.py
@@ -66,6 +66,13 @@ psycopg2.extensions.register_type(
psycopg2.extensions.new_type((1186,), 'INTERVAL_TEXT', psycopg2.STRING)
)
+# This registers a type caster for int4range, int8range, numrange
+# tsrange, tstzrange, daterange
+psycopg2.extensions.register_type(
+ psycopg2.extensions.new_type(
+ (3904, 3926, 3906, 3908, 3910, 3912),
+ 'NUMERIC_RANGE_TEXT', psycopg2.STRING)
+)
def register_date_typecasters(connection):
"""
view thread (2+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: PATCH: handling of range types (pgAdmin4)
In-Reply-To: <CAKKotZSQfKQn9dfVRqOojqTF2jb460CekF_9VjNLrf0zWJqjjA@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox