Re: replace all with * in pg_hba.conf

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: replace all with * in pg_hba.conf
Дата
Msg-id 3FE20B56.3000705@dunslane.net
обсуждение исходный текст
Ответ на Re: replace all with * in pg_hba.conf  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: replace all with * in pg_hba.conf  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
I wrote:

> Peter Eisentraut wrote:
>
>> Andrew Dunstan wrote:
>>  
>>
>>> If people are happy with Tom's suggestion of using '*' instead of
>>> 'all' in pg_hba.conf I will prepare a patch for it.
>>>   
>>
>>
>> Well, while we're breaking stuff in the name of improvement, what 
>> about databases named "*" or databases with spaces in their names?
>>  
>>
>
> Good point. Perhaps we need to provide for an escaping mechanism in 
> the routines that parse the file, although personally I have little 
> sympathy for anyone who names a database '*'. I think it comes into 
> the category of "Doctor, it hurts when I do this" ... "Then stop doing 
> that." Spaces are a more likely problem, especially when we get W32 
> native users.


Looking at the code I discover that there is already provision covering 
spaces etc., because you can quote names. It's even documented ;-)

The minimal disturbance change might be to teach the parser to 
distinguish between a quoted 'all' and an unquoted 'all', and forget the 
'*' idea. Alternatively, do the same sort of thing, but replacing 'all' 
with '*'. A patch for the first would be quite tiny - similar for '*' 
except for extra doc and sample file changes.

cheers

andrew





В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: 7.4 include file conflict
Следующее
От: Gavin Sherry
Дата:
Сообщение: Re: Why isn't DECLARE CURSOR ... FOR UPDATE supported?