pgsql: Fix core dump due to null-pointer dereference in to_char() when - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Fix core dump due to null-pointer dereference in to_char() when
Date
Msg-id 20090312005325.6447D754AD4@cvs.postgresql.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
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.

Modified Files:
--------------
    pgsql/src/backend/utils/adt:
        formatting.c (r1.154 -> r1.155)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/formatting.c?r1=1.154&r2=1.155)

pgsql-committers by date:

Previous
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Code review for dtrace probes added (so far) to 8.4.
Next
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Fix core dump due to null-pointer dereference in to_char() when