Re: Fwd: Keywords in pg_hba.conf should be field-specific - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Fwd: Keywords in pg_hba.conf should be field-specific
Date
Msg-id 13664.1308667649@sss.pgh.pa.us
Whole thread Raw
In response to Re: Fwd: Keywords in pg_hba.conf should be field-specific  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: Fwd: Keywords in pg_hba.conf should be field-specific
Re: Fwd: Keywords in pg_hba.conf should be field-specific
List pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Excerpts from Pavel Stehule's message of mar jun 21 00:59:44 -0400 2011:
>> because >>pamservice<< - is known keyword, but 'pamservice' is some
>> literal without any mean. You should to use a makro token_is_keyword
>> more often.

> Yeah, I wondered about this too (same with auth types, i.e. do we accept
> quoted "hostssl" and so on or should that by rejected?).  I opted for
> leaving it alone, but maybe this needs to be fixed.  (Now that I think
> about it, what we should do first is verify whether it works with quotes
> in the unpatched code).

AFAICS, this is only important in places where the syntax allows either
a keyword or an identifier.  If only a keyword is possible, there is no
value in rejecting it because it's quoted.  And, when you do the test,
I think you'll find that it would be breaking hba files that used to
work (though admittedly, it's doubtful that there are any such in the
field).
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Ross J. Reedstrom"
Date:
Subject: Re: Fwd: Keywords in pg_hba.conf should be field-specific
Next
From: Magnus Hagander
Date:
Subject: Re: Re: [COMMITTERS] pgsql: Fixed string in German translation that causes segfault.