pgadmin4/web/pgadmin/utils
Surinder Kumar 5dbbd8e638 Resolve problem displaying intervals and timestamps. Fixes #1352
1) No handling for INTERVAL type datetime.
For example: executing query
SELECT INTERVAL '15 minutes';
throws json serialization error, because it returns time in timedelta format which is not handled.

Added support to handle timedelta datetime format in DataTypeJSONEncoder class

2) When we try to get BC dates from database raises ValueError: year is out of range
For eg:
SELECT TIMESTAMP '0044-03-15 10:00:00 BC',
It is because pyscopg2 doesn't handle BC datetime format.

So we have defined our method which type cast the datetime value to string in pyscopg2 overriding default behaviour.

Reference:
http://initd.org/psycopg/docs/advanced.html#type-casting-from-sql-to-python
ccf3693be6/pgcli/pgexecute.py
2016-06-14 17:09:47 +01:00
..
driver Resolve problem displaying intervals and timestamps. Fixes #1352 2016-06-14 17:09:47 +01:00
sqlautocomplete Adding support for autocomplete in the SQL Editor. 2016-05-21 16:04:29 +05:30
__init__.py Added support for the server side file manager, which will be useful in 2016-05-13 00:04:32 +05:30
ajax.py Resolve problem displaying intervals and timestamps. Fixes #1352 2016-06-14 17:09:47 +01:00
crypto.py Change server password feature 2016-05-13 13:21:20 +05:30
html.py [Python 3 compatibility] Introduced a separate HTML safe string function 2016-05-16 11:58:42 +05:30
menu.py Dashboards v1 2016-05-05 16:42:16 +01:00
paths.py Fix file selection on Windows. Fixes #1319 2016-06-10 17:06:22 +01:00
preferences.py Addd support for taking backup for the server. 2016-05-15 16:04:39 +05:30
route.py Initial version of a regression test framework 2016-04-17 10:39:08 -04:00
session.py Do not honour the session-id, longer than 40 characters, instead create 2016-05-09 00:04:37 +05:30