Search Postgresql Archives

Re: day interval

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

 



>>>>> "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