[pgAdmin4][Patch]: RM#1352 - Problem displaying intervals and timestamps with pgAdmin 4

Поиск
Список
Период
Сортировка
От Surinder Kumar
Тема [pgAdmin4][Patch]: RM#1352 - Problem displaying intervals and timestamps with pgAdmin 4
Дата
Msg-id CAM5-9D98iZ1HxPSKKvXswoR6=W-S0E-BG68rEXVe6WErvTKd6Q@mail.gmail.com
обсуждение исходный текст
Ответы Re: [pgAdmin4][Patch]: RM#1352 - Problem displaying intervals and timestamps with pgAdmin 4
Список pgadmin-hackers
Hi,

Please find the patch with issues fixed:

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:

Issue left:
Pyscopg2 not handling representation of BC dates. It is currently representing time in following query
SELECT TIMESTAMPTZ '2016-03-15 10:00:00+02 AD';
as
2016-03-15T00:00:00Z
which is wrong.
I will send patch for it when gets fixed.

Please review.


Thanks,
Surinder Kumar

Вложения

В списке pgadmin-hackers по дате отправления:

Предыдущее
От: Murtuza Zabuawala
Дата:
Сообщение: PATCH: To have validation messages on status panel only (pgAdmin4)
Следующее
От: Murtuza Zabuawala
Дата:
Сообщение: Re: PATCH: Added Statistics functionality for many nodes (pgAdmin4)