Re: Patch for str_numth() in PG 7.4

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: Andreas 'ads' Scherbaum <adsmail(at)wars-nicht(dot)de>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Patch for str_numth() in PG 7.4
Date: 2009-01-12 23:44:00
Message-ID: 87tz84jdj3.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andreas 'ads' Scherbaum <adsmail(at)wars-nicht(dot)de> writes:

> 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.

I think you attached the wrong patch.

> *** src/bin/psql/describe.c 2008-12-21 13:19:40.000000000 +0100
> --- src/bin/psql/describe.c.orig 2008-12-21 02:16:31.000000000 +0100
> ***************
> *** 464,476 ****
> " d.datctype as \"%s\",\n",
> gettext_noop("Collation"),
> gettext_noop("Ctype"));
> ! if (pset.sversion >= 80100)
> ! appendPQExpBuffer(&buf,
> ! " pg_catalog.array_to_string(d.datacl, E'\\n') as \"%s\"",
> ! gettext_noop("Access Privileges"));
> ! else
> ! appendPQExpBuffer(&buf,
> ! " pg_catalog.array_to_string(d.datacl, '\\n') as \"%s\"",
> gettext_noop("Access Privileges"));
> if (verbose && pset.sversion >= 80200)
> appendPQExpBuffer(&buf,
> --- 464,471 ----
> " d.datctype as \"%s\",\n",
> gettext_noop("Collation"),
> gettext_noop("Ctype"));
> ! appendPQExpBuffer(&buf,
> ! " d.datacl as \"%s\"",
> gettext_noop("Access Privileges"));
> if (verbose && pset.sversion >= 80200)
> appendPQExpBuffer(&buf,

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's RemoteDBA services!

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andreas 'ads' Scherbaum 2009-01-12 23:52:28 Re: Patch for str_numth() in PG 7.4
Previous Message Andreas 'ads' Scherbaum 2009-01-12 21:55:32 Patch for str_numth() in PG 7.4