Search Postgresql Archives

RE: Re: day interval

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks everyone.
EDB installs oracle compatible parameters.
See below

C:\Program Files\edb\as9.6\bin>psql -p5488 postgres enterprisedb
Password for user enterprisedb:
psql (9.6.2.7)
...
### Oracle compatible mode
postgres=# select date('20191001') - date('20190101');
 ?column?
----------
 273 days
(1 row)

## Postgres compatible mode
postgres=# set edb_redwood_date=off;
SET

postgres=# select date('20191001') - date('20190101');
 ?column?
----------
      273
(1 row)

-----Original Message-----
From: Andrew Gierth <andrew@xxxxxxxxxxxxxxxxxxxx> 
Sent: Saturday, October 12, 2019 8:48 PM
To: Abraham, Danny <danny_abraham@xxxxxxx>
Cc: Adrian Klaver <adrian.klaver@xxxxxxxxxxx>; pgsql-general@xxxxxxxxxxxxxx
Subject: [EXTERNAL] Re: day interval

>>>>> "Abraham" == Abraham, Danny <danny_abraham@xxxxxxx> writes:

 Abraham> Thanks for the clarification.
 Abraham> The problem is still this:
 Abraham> select date('20191001') - date('20190101') ;  Abraham> in my servers it is always '273'.
 Abraham> In the customer's DB it is '273 days';

Then you need to establish why that is.

For example, try these in psql on the customer's db and show us the
outputs:

\dT *.date
\df *.date

select castsource::regtype,
       casttarget::regtype,
       castfunc::regprocedure,
       castcontext,
       castmethod
  from pg_cast c join pg_type t on (casttarget=t.oid)  where typname='date';

select oprresult::regtype       
  from pg_operator
       join pg_type t1 on (t1.oid=oprleft)
       join pg_type t2 on (t2.oid=oprright)  where oprname='-' and t1.typname='date' and t2.typname='date';

--
Andrew (irc:RhodiumToad)






[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux