Re: Require Assistance Solving Problem - erroneous pg_hba.conf

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Greg Kelley <gkelley(at)britannicaviation(dot)com>, pgsql-admin(at)postgresql(dot)org, Joe Conway <mail(at)joeconway(dot)com>
Subject: Re: Require Assistance Solving Problem - erroneous pg_hba.conf
Date: 2003-04-17 17:13:12
Message-ID: 200304171713.h3HHDCs07884@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin


Yep, makes sense. This is clearly our bug because we overrode a
standard C function with one that didn't behave the same. My man page
says isblank tests only for space and tab, while we added \r to handle
DOS files cleanly.

---------------------------------------------------------------------------

Tom Lane wrote:
> "Greg Kelley" <gkelley(at)britannicaviation(dot)com> writes:
> > A RedHat Upgrade Saturday from 8.0 to 9.0 just did a 'minor' version
> > upgrade from 7.3.1 to 7.3.2.
> > [ and broke his pg_hba.conf ]
>
> Ah-hah, I now know where the behavioral change came from: the Red Hat
> RPMs contain this patch:
>
> --- postgresql-7.3.2/src/backend/libpq/hba.c.sopwith 2003-01-09 09:09:01.000000000 -0500
> +++ postgresql-7.3.2/src/backend/libpq/hba.c 2003-01-09 09:09:09.000000000 -0500
> @@ -72,11 +72,13 @@
> * Some standard C libraries, including GNU, have an isblank() function.
> * Others, including Solaris, do not. So we have our own.
> */
> +#ifndef isblank
> static bool
> isblank(const char c)
> {
> return c == ' ' || c == '\t' || c == '\r';
> }
> +#endif
>
>
> /*
>
> which on RHL 9 causes the system definition of isblank() to be
> substituted for Postgres'. That means \r is no longer treated as
> whitespace, as it was in prior versions.
>
> There is a fix in our CVS tree that prevents this problem and restores
> the old treatment of \r, but for now you gotta get rid of the Windows-
> style newlines.
>
> regards, tom lane
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Mike Castle 2003-04-17 23:15:01 Re: Require Assistance Solving Problem - erroneous pg_hba.conf
Previous Message Greg Kelley 2003-04-17 17:01:05 Re: Require Assistance Solving Problem - erroneous pg_hba.conf