From: | Brendan Jurd <direvus(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
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-17 04:54:08 |
Message-ID: | AANLkTi=CEXnzxgWHcThQaKC5SMR9JKrY7G1FxM9Nsyqr@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 17 October 2010 09:59, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Brendan Jurd <direvus(at)gmail(dot)com> writes:
>> 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 ...
>
I'm happy to revise the patch on that basis. Any suggestions about
how to communicate the 'quotedness' of each token? We could make each
token a struct consisting of the token itself, plus a boolean flag to
indicate whether it had been quoted. Does that work for you?
Cheers,
BJ
From | Date | Subject | |
---|---|---|---|
Next Message | Dmitriy Igrishin | 2010-10-17 06:03:28 | Re: How to determine failed connection attempt due to invalid authorization (libpq)? |
Previous Message | Alvaro Herrera | 2010-10-17 03:15:07 | Re: Review: Fix snapshot taking inconsistencies |