Patch for str_numth() in PG 7.4

From: Andreas 'ads' Scherbaum <adsmail(at)wars-nicht(dot)de>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Patch for str_numth() in PG 7.4
Date: 2009-01-12 21:55:32
Message-ID: 20090112225532.1f0964e3@iridium.wars-nicht.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
linebreaks_for_l_plus_2008-12-21.patch text/x-patch 1001 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gregory Stark 2009-01-12 23:44:00 Re: Patch for str_numth() in PG 7.4
Previous Message Kevin Grittner 2009-01-12 21:32:35 Re: Recovery Test Framework