public inbox for [email protected]  
help / color / mirror / Atom feed
PATCH: handling of range types (pgAdmin4)
2+ messages / 2 participants
[nested] [flat]

* PATCH: handling of range types (pgAdmin4)
@ 2016-09-06 12:57 Murtuza Zabuawala <[email protected]>
  2016-09-06 13:27 ` Re: PATCH: handling of range types (pgAdmin4) Dave Page <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: Murtuza Zabuawala @ 2016-09-06 12:57 UTC (permalink / raw)
  To: pgadmin-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):
     """


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: PATCH: handling of range types (pgAdmin4)
  2016-09-06 12:57 PATCH: handling of range types (pgAdmin4) Murtuza Zabuawala <[email protected]>
@ 2016-09-06 13:27 ` Dave Page <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Dave Page @ 2016-09-06 13:27 UTC (permalink / raw)
  To: Murtuza Zabuawala <[email protected]>; +Cc: pgadmin-hackers

Thanks, applied.

On Tue, Sep 6, 2016 at 1:57 PM, Murtuza Zabuawala
<[email protected]> wrote:
> 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
>



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

EnterpriseDB UK: 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




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2016-09-06 13:27 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-09-06 12:57 PATCH: handling of range types (pgAdmin4) Murtuza Zabuawala <[email protected]>
2016-09-06 13:27 ` Dave Page <[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