Re: BUG #4752: sourceline in pg_settings indicates wrong number

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема Re: BUG #4752: sourceline in pg_settings indicates wrong number
Дата
Msg-id 3f0b79eb0904090339s28f87612q70f97efeb528d58a@mail.gmail.com
обсуждение исходный текст
Ответ на BUG #4752: sourceline in pg_settings indicates wrong number  ("Fujii Masao" <masao.fujii@gmail.com>)
Ответы Re: BUG #4752: sourceline in pg_settings indicates wrong number  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Hi,

On Thu, Apr 9, 2009 at 1:40 PM, Fujii Masao <masao.fujii@gmail.com> wrote:
>
> The following bug has been logged online:
>
> Bug reference:      4752
> Logged by:          Fujii Masao
> Email address:      masao.fujii@gmail.com
> PostgreSQL version: PostgreSQL 8.4d
> Operating system:   Red Hat Enterprise Linux Server release 5.1 (Tikanga)
> Description:        sourceline in pg_settings indicates wrong number
> Details:
>
> Hi,
>
> sourceline (in pg_settings) of the parameter line without '\n' indicates
> wrong number as follows.
>
>  $ nl $PGDATA/postgresql.conf
>     1  shared_buffers = 32MB         <-- this line doesn't contain '\n'
>  $ psql -c "SELECT sourceline FROM pg_settings WHERE name =
> 'shared_buffers'"
>  sourceline
>  ------------
>           0
>  (1 row)
>
> On the other hand, if the line has '\n', sourceline indicates the correct
> number.
>
>  $ echo "shared_buffers = 32MB" > $PGDATA/postgresql.conf
>  $ nl $PGDATA/postgresql.conf
>     1  shared_buffers = 32MB         <-- this line contains '\n'
>  $ psql -c "SELECT sourceline FROM pg_settings WHERE name =
> 'shared_buffers'"
>   sourceline
>  ------------
>           1
>  (1 row)
>
> Is this bug?

Attached patch fixes the bug. Is this worth committing?

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

Вложения

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

Предыдущее
От: "Fujii Masao"
Дата:
Сообщение: BUG #4752: sourceline in pg_settings indicates wrong number
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #4752: sourceline in pg_settings indicates wrong number