Patch for str_numth() in PG 7.4 - Mailing list pgsql-hackers

From Andreas 'ads' Scherbaum
Subject Patch for str_numth() in PG 7.4
Date
Msg-id 20090112225532.1f0964e3@iridium.wars-nicht.de
Whole thread Raw
Responses Re: Patch for str_numth() in PG 7.4  (Gregory Stark <stark@enterprisedb.com>)
Re: Patch for str_numth() in PG 7.4  (Andreas 'ads' Scherbaum <adsmail@wars-nicht.de>)
List pgsql-hackers
Hello,

even if 7.4 is almost at the end of it's lifetime i found a bug/problem
on a fairly new laptop (not surprising: during upgrade tests). All
timestamp regression tests failed, only "th" was emitted.

I tracked the problem done to the function str_numth() in
src/backend/utils/adt/formatting.c. The fix (attached) is easy: i
stole the function code from the latest 8.0 version which looks fare
more sane in handling the string pointers.

Since this patch is easy enough (replacing one line with three
lines of code), does not seem to break existing code and removes at
least one bug i ask to include this patch into the next 7.4 release (i
assume there will be at least one release if 7.4 reaches eol).


Thanks & kind regards

--
                Andreas 'ads' Scherbaum
German PostgreSQL User Group
European PostgreSQL User Group - Board of Directors

Attachment

pgsql-hackers by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: Recovery Test Framework
Next
From: Gregory Stark
Date:
Subject: Re: Patch for str_numth() in PG 7.4