]> granicus.if.org Git - postgresql/commit
Fix core dump due to null-pointer dereference in to_char() when datetime
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 12 Mar 2009 00:54:04 +0000 (00:54 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 12 Mar 2009 00:54:04 +0000 (00:54 +0000)
commitaff86a81b5dc66715158db48f0aae5c5b7dc36a5
treea162515e3b26db3c27b93837d6b340432a67720c
parentcb5a81b54681a9717880b3c45408a80a834eafa1
Fix core dump due to null-pointer dereference in to_char() when datetime
format codes are misapplied to a numeric argument.  (The code still produces
a pretty bogus error message in such cases, but I'll settle for stopping the
crash for now.)  Per bug #4700 from Sergey Burladyan.

Problem exists in all supported branches, so patch all the way back.
In HEAD, also clean up some ugly coding in the nearby cache management
code.
src/backend/utils/adt/formatting.c