Re: BUG #15445: Difference between two dates is not an integer
Martin Varady <martin.varady@gmail.com>
From: Martin Varady <martin.varady@gmail.com>
To: sk@zsrv.org
Cc: pgsql-bugs@lists.postgresql.org
Date: 2018-10-19T14:05:46Z
Lists: 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. [image: image.png] 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 >