Hi, On Thu, Apr 9, 2009 at 1:40 PM, Fujii Masao <masao.fu...@gmail.com> wrote: > > The following bug has been logged online: > > Bug reference: 4752 > Logged by: Fujii Masao > Email address: masao.fu...@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
? GNUmakefile ? config.log ? config.status ? contrib/pg_standby/pg_standby ? contrib/pgbench/pgbench ? src/Makefile.global ? src/backend/postgres ? src/backend/catalog/postgres.bki ? src/backend/catalog/postgres.description ? src/backend/catalog/postgres.shdescription ? src/backend/snowball/snowball_create.sql ? src/backend/utils/probes.h ? src/backend/utils/mb/conversion_procs/conversion_create.sql ? src/bin/initdb/initdb ? src/bin/pg_config/pg_config ? src/bin/pg_controldata/pg_controldata ? src/bin/pg_ctl/pg_ctl ? src/bin/pg_dump/pg_dump ? src/bin/pg_dump/pg_dumpall ? src/bin/pg_dump/pg_restore ? src/bin/pg_resetxlog/pg_resetxlog ? src/bin/psql/psql ? src/bin/scripts/clusterdb ? src/bin/scripts/createdb ? src/bin/scripts/createlang ? src/bin/scripts/createuser ? src/bin/scripts/dropdb ? src/bin/scripts/droplang ? src/bin/scripts/dropuser ? src/bin/scripts/reindexdb ? src/bin/scripts/vacuumdb ? src/include/pg_config.h ? src/include/stamp-h ? src/interfaces/ecpg/compatlib/exports.list ? src/interfaces/ecpg/compatlib/libecpg_compat.so.3.1 ? src/interfaces/ecpg/ecpglib/exports.list ? src/interfaces/ecpg/ecpglib/libecpg.so.6.1 ? src/interfaces/ecpg/include/ecpg_config.h ? src/interfaces/ecpg/include/stamp-h ? src/interfaces/ecpg/pgtypeslib/exports.list ? src/interfaces/ecpg/pgtypeslib/libpgtypes.so.3.1 ? src/interfaces/ecpg/preproc/ecpg ? src/interfaces/libpq/exports.list ? src/interfaces/libpq/libpq.so.5.2 ? src/port/pg_config_paths.h ? src/test/regress/pg_regress ? src/test/regress/testtablespace ? src/timezone/zic Index: src/backend/utils/misc/guc-file.l =================================================================== RCS file: /projects/cvsroot/pgsql/src/backend/utils/misc/guc-file.l,v retrieving revision 1.58 diff -c -r1.58 guc-file.l *** src/backend/utils/misc/guc-file.l 1 Jan 2009 17:23:53 -0000 1.58 --- src/backend/utils/misc/guc-file.l 9 Apr 2009 10:34:44 -0000 *************** *** 449,454 **** --- 449,457 ---- if (token != GUC_EOL && token != 0) goto parse_error; + if (token == 0) + ConfigFileLineno++; + /* OK, process the option name and value */ if (guc_name_compare(opt_name, "include") == 0) {
-- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs