From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Brendan Jurd <direvus(at)gmail(dot)com> |
Cc: | Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Keywords in pg_hba.conf should be field-specific |
Date: | 2010-10-16 22:59:40 |
Message-ID: | 13033.1287269980@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Brendan Jurd <direvus(at)gmail(dot)com> writes:
> Full answer: The problem is that pg_hba.conf doesn't have a fixed
> structure. Each line can be 4, 5 or 6 fields (not including the final
> 'options' field) long, and which of these structures apply to any
> given line isn't decided until parse_hba_line goes to work on it.
> At the time that next_token gets called, we have no way of knowing
> which field is currently being tokenised, at least not without doing
> some serious rearrangement of hba.c, so that it tokenises and then
> parses one token at a time, instead of tokenising the whole file and
> then parsing all the lines.
Good point. Maybe the correct fix is to remember whether each token was
quoted or not, so that keyword detection can be done safely after the
initial lexing. I still think that the current method is impossibly
ugly ...
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tatsuo Ishii | 2010-10-17 01:25:23 | Re: Is LISTEN/NOTIFY reliable? |
Previous Message | Tom Lane | 2010-10-16 22:55:23 | Re: Keywords in pg_hba.conf should be field-specific |