Reject out-of-range dates in to_date().
authorTom Lane <[email protected]>
Mon, 14 Jan 2013 20:19:48 +0000 (15:19 -0500)
committerTom Lane <[email protected]>
Mon, 14 Jan 2013 20:20:02 +0000 (15:20 -0500)
commit0471b013aab87ebfbb767e9456c7b619d5c2b9d3
tree0c33d292cc3470de149b0b0e01cd894e3e65a99a
parent7938d84a3234594a9183fcdc84c855c4b883c3bb
Reject out-of-range dates in to_date().

Dates outside the supported range could be entered, but would not print
reasonably, and operations such as conversion to timestamp wouldn't behave
sanely either.  Since this has the potential to result in undumpable table
data, it seems worth back-patching.

Hitoshi Harada
src/backend/utils/adt/formatting.c