Re: BUG #15445: Difference between two dates is not an integer

From: Martin Varady <martin(dot)varady(at)gmail(dot)com>
To: sk(at)zsrv(dot)org
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #15445: Difference between two dates is not an integer
Date: 2018-10-19 14:05:46
Message-ID: CAE6fTZ9W78nviXXJ4A_Qvi46ecjtsbVQgnLKTX7QTgSPhgxXjQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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(at)zsrv(dot)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
>

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2018-10-19 14:26:08 Re: BUG #15445: Difference between two dates is not an integer
Previous Message Sergei Kornilov 2018-10-19 13:26:27 Re: BUG #15445: Difference between two dates is not an integer