From: Rajesh S <rajesh.s@fincuro.com>
To: Ravi Krishna <s_ravikrishna@aol.com>
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: - operator overloading not giving expected result
Date: Mon, 11 Jul 2022 16:43:34 +0530
Message-ID: <627fb755-dc3a-9873-f54e-1e7e72096e2e@fincuro.com> (raw)
In-Reply-To: <1535945057.1729527.1657290905981@mail.yahoo.com>
References: <7f97243d-db62-199a-8412-5637963d117e@fincuro.com>
<1535945057.1729527.1657290905981@mail.yahoo.com>
Hi All,
Thank you for your valuable comments and suggestions. As it was pointed
out we are using EDB Postgres and the language was mentioned as
'edbspl'. We made to work by setting the search_path variable as follows:
set search_path="$user", public, pg_catalog
And also changed the Operator overloading function as below. This gave
us the expected results. Thanks once again for all your comments.
Consider this thread as closed.
CREATE OR REPLACE FUNCTION public.dt_minus_dt(dt1 DATE, dt2 DATE)
RETURNS INTEGER as
$$
SELECT (to_char(dt1::date,'J'::varchar) -
to_char(dt2::date,'J'::varchar))::integer
$$ LANGUAGE SQL IMMUTABLE STRICT PARALLEL SAFE COST 1;
CREATE OPERATOR public.- (
PROCEDURE = dt_minus_dt,
LEFTARG = DATE,
RIGHTARG = DATE
);
Thanks,
Rajesh S
On 08-07-2022 08:05 pm, Ravi Krishna wrote:
> LANGUAGE 'edbspl'
>
> This is the root cause of your issue.
>
>
> You are not using PGSQL, but EDB version of it which is compatible with Oracle PL/SQL.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: rajesh.s@fincuro.com, s_ravikrishna@aol.com
Subject: Re: - operator overloading not giving expected result
In-Reply-To: <627fb755-dc3a-9873-f54e-1e7e72096e2e@fincuro.com>
References: <7f97243d-db62-199a-8412-5637963d117e@fincuro.com> <1535945057.1729527.1657290905981@mail.yahoo.com> <627fb755-dc3a-9873-f54e-1e7e72096e2e@fincuro.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox