Re: difference between implicit/explicit cast of integer to interval - Mailing list pgsql-general

From Tom Lane
Subject Re: difference between implicit/explicit cast of integer to interval
Date
Msg-id 22536.1341204880@sss.pgh.pa.us
Whole thread Raw
In response to difference between implicit/explicit cast of integer to interval  (raf <raf@raf.org>)
List pgsql-general
raf <raf@raf.org> writes:
> Q1) if an integer cannot be explicitly cast into an interval, what is happening
> when a date difference is stored in an interval variable to allow it to happen?

plpgsql is really lax about type coercions.  It typically does them by
converting the source value to text and then converting that string to
the target type.  If we were designing that language today, I doubt
we'd have accepted such a definition, but changing it now would break
a lot of code ...

            regards, tom lane

pgsql-general by date:

Previous
From: raf
Date:
Subject: difference between implicit/explicit cast of integer to interval
Next
From: Janne H
Date:
Subject: Do I need archive_mode = on for hot standby?