Re: pg_hba.conf parse error gives wrong line number

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_hba.conf parse error gives wrong line number
Date: 2002-12-10 20:00:52
Message-ID: 200212102000.gBAK0qa26334@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


I see the problem with the line number here. I will work on a fix now.
Thanks.

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

Oliver Elphick wrote:
> With this pg_hba.conf (line numbers from vi, of course):
>
> 48 # TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD 49
> 50 local all all ident sameuser
> 51 host all 127.0.0.1 127.0.0.1 ident s ameuser
> 52
>
> we naturally get a parse error because of the missing user column entry
> in line 51. But in the log we see:
>
> Dec 10 19:27:42 linda postgres[10944]: [8] LOG: parse_hba: invalid
> syntax in pg_hba.conf file at line 95, token "ident"
>
> In a more complicated file, a bogus line number is going to make
> debugging very tricky. I tried following this in gdb, but haven't
> managed to track it through the fork of the new backend.
>
> --
> Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
> Isle of Wight, UK http://www.lfix.co.uk/oliver
> GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
> ========================================
> "I beseech you therefore, brethren, by the mercies of
> God, that ye present your bodies a living sacrifice,
> holy, acceptable unto God, which is your reasonable
> service." Romans 12:1
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>

--
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-hackers by date

  From Date Subject
Next Message Tom Lane 2002-12-10 20:01:09 Geometry regression tests (was Re: [PATCHES] Alter domain)
Previous Message Christopher Kings-Lynne 2002-12-10 19:47:04 Re: psql's \d commands --- end of the line for