Forgive trailing semicolons inside of config files

Поиск
Список
Период
Сортировка
От Greg Sabino Mullane
Тема Forgive trailing semicolons inside of config files
Дата
Msg-id CAKAnmm+o3QA7oXmGbBUXBeNL6ZSr9Nw4+VNW8H2FUDwGXSF-wQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: Forgive trailing semicolons inside of config files  (Isaac Morland <isaac.morland@gmail.com>)
Список pgsql-hackers
This has been a long-standing annoyance of mine. Who hasn't done something like this?:

psql> SET random_page_cost = 2.5;
(do some stuff, realize that rpc was too high)

Let's put that inside of postgresql.conf:

#------------------------------------------------------------------------------
# CUSTOMIZED OPTIONS
#------------------------------------------------------------------------------

# Add settings for extensions here                                                                                                    
random_page_cost = 2.5;


Boom! Server will not start. Surely, we can be a little more liberal in what we accept? Attached patch allows a single trailing semicolon to be silently discarded. As this parsing happens before the logging collector starts up, the error about the semicolon is often buried somewhere in a separate logfile or journald - so let's just allow postgres to start up since there is no ambiguity about what random_page_cost (or any other GUC) is meant to be set to.

I also considered doing an additional ereport(LOG) when we find one, but seemed better on reflection to simply ignore it.

Cheers,
Greg

Вложения

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: cataloguing NOT NULL constraints
Следующее
От: "Tristan Partin"
Дата:
Сообщение: Re: Use COPY for populating all pgbench tables