public inbox for [email protected]
help / color / mirror / Atom feedFrom: Murtuza Zabuawala <[email protected]>
To: Dave Page <[email protected]>
Cc: pgadmin-hackers <[email protected]>
Subject: Re: PATCH: To fix Timestamps displaying with time as 00:00 (pgAdmin4)
Date: Mon, 18 Jul 2016 12:04:14 +0530
Message-ID: <CAKKotZRJJbo_ZUzgYhNkGjhruP97uWmdNwvyiTuOd885ouu5tg@mail.gmail.com> (raw)
In-Reply-To: <CA+OCxozME_P1fgRHB9OnYVF1G6rvY6fnuravNf2r2D3CrJMSXA@mail.gmail.com>
References: <CAKKotZQ4mpJFGeVnRUCbRCO0YDoQsg2AmrL1WYTrJg4xRbz3Fw@mail.gmail.com>
<CA+OCxozME_P1fgRHB9OnYVF1G6rvY6fnuravNf2r2D3CrJMSXA@mail.gmail.com>
List-Unsubscribe: <mailto:[email protected]?body=unsub%20pgadmin-hackers>
Hi Dave,
Please find patch to fix the issue for interval type casting.
Regards,
Murtuza
--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
On Fri, Jul 15, 2016 at 4:31 PM, Dave Page <[email protected]> wrote:
> Hi
>
> On Thu, Jul 14, 2016 at 7:00 AM, Murtuza Zabuawala
> <[email protected]> wrote:
> > Hi,
> >
> > PFA patch to fix the issue in timestamp datatype(s) displaying with time
> as
> > 00:00
> > (RM#1437)
> >
> > The issue was with backgrid datetime cell which do not fully support
> > ISO-8601 datetime format.
>
> Thanks - this worked, except for the 'interval' type, I've committed
> the patch without that change; please submit another fixing that
> remaining issue.
>
> e.g. select '1 month'::interval
>
> displays: 00:00:00
>
> --
> 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
Attachments:
[application/octet-stream] add_support_for_interval.patch (601B, 3-add_support_for_interval.patch)
download | inline diff:
diff --git a/web/pgadmin/utils/driver/psycopg2/__init__.py b/web/pgadmin/utils/driver/psycopg2/__init__.py
index 751dd0c..ec0a8fc 100644
--- a/web/pgadmin/utils/driver/psycopg2/__init__.py
+++ b/web/pgadmin/utils/driver/psycopg2/__init__.py
@@ -53,6 +53,11 @@ psycopg2.extensions.register_type(
psycopg2.extensions.new_type((701,), 'NaN_TEXT', psycopg2.STRING)
)
+# This registers a type caster for datatype 'interval'.
+psycopg2.extensions.register_type(
+ psycopg2.extensions.new_type((1186,), 'INTERVAL_TEXT', psycopg2.STRING)
+)
+
def register_date_typecasters(connection):
"""
view thread (4+ 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], [email protected]
Subject: Re: PATCH: To fix Timestamps displaying with time as 00:00 (pgAdmin4)
In-Reply-To: <CAKKotZRJJbo_ZUzgYhNkGjhruP97uWmdNwvyiTuOd885ouu5tg@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