Re: BUG #15445: Difference between two dates is not an integer
От | Martin Varady |
---|---|
Тема | Re: BUG #15445: Difference between two dates is not an integer |
Дата | |
Msg-id | CAE6fTZ9W78nviXXJ4A_Qvi46ecjtsbVQgnLKTX7QTgSPhgxXjQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: BUG #15445: Difference between two dates is not an integer (Sergei Kornilov <sk@zsrv.org>) |
Ответы |
Re: BUG #15445: Difference between two dates is not an integer
|
Список | pgsql-bugs |
I got what you would expect but still doesn't work. It is the enterpriseDB version we bought for Oracle to Postgres conversions.
"EnterpriseDB 10.4.9, compiled by Visual C++ build 1800, 64-bit"
I'll keep looking at it to see if I can figure it out. Thanks.

On Fri, Oct 19, 2018 at 9:26 AM Sergei Kornilov <sk@zsrv.org> wrote:
Hello
Works for me in pg 10.5, 11.0, and 9.6
Try this query:
SELECT n.nspname as "Schema",
o.oprname AS "Name",
CASE WHEN o.oprkind='l' THEN NULL ELSE pg_catalog.format_type(o.oprleft, NULL) END AS "Left arg type",
CASE WHEN o.oprkind='r' THEN NULL ELSE pg_catalog.format_type(o.oprright, NULL) END AS "Right arg type",
pg_catalog.format_type(o.oprresult, NULL) AS "Result type",
coalesce(pg_catalog.obj_description(o.oid, 'pg_operator'),
pg_catalog.obj_description(o.oprcode, 'pg_proc')) AS "Description"
FROM pg_catalog.pg_operator o
LEFT JOIN pg_catalog.pg_namespace n ON n.oid = o.oprnamespace
WHERE o.oprname OPERATOR(pg_catalog.=) '-'
AND o.oprleft OPERATOR(pg_catalog.=) (select oid from pg_type where typname OPERATOR(pg_catalog.=) 'date')
AND o.oprleft OPERATOR(pg_catalog.=) o.oprright
AND pg_catalog.pg_operator_is_visible(o.oid)
ORDER BY 1, 2, 3, 4;
Maybe you have custom operators?
regards, Sergei
Вложения
В списке pgsql-bugs по дате отправления: