BUG #4894: [patch] documentation bug on 'include' directive
The following bug has been logged online:
Bug reference: 4894
Logged by: Peter Schuller
Email address: peter.schuller@infidyne.com
PostgreSQL version: CVS
Operating system: N/A
Description: [patch] documentation bug on 'include' directive
Details:
The documentation says to use:
include 'filename'
Which fails with a generic error. Correct syntax is:
include = 'filename'
Suggested fix:
Since the form is likely to munch whitespace, the authoritative patch is
here:
http://distfiles.scode.org/mlref/pg-include-doc.patch
For convenience here's a cut'n'paste (which is likely broken):
Index: doc/src/sgml/config.sgml
===================================================================
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/config.sgml,v
retrieving revision 1.220
diff -u -r1.220 config.sgml
--- doc/src/sgml/config.sgml 17 Jun 2009 21:58:48 -0000 1.220
+++ doc/src/sgml/config.sgml 29 Jun 2009 15:44:57 -0000
@@ -82,11 +82,12 @@
another file to read and process as if it were inserted into the
configuration file at this point. Include directives simply look
like:
<programlisting>
-include 'filename'
+include = 'filename'
</programlisting>
If the file name is not an absolute path, it is taken as relative to
the directory containing the referencing configuration file.
- Inclusions can be nested.
+ Inclusions can be nested. Contrary to what is implied by the syntax,
+ it is not an assignment and multiple include directives can be used.
</para>
<para>
"Peter Schuller" <peter.schuller@infidyne.com> writes:
The documentation says to use:
include 'filename'
Which fails with a generic error.
What generic error?
Correct syntax is:
include = 'filename'
The stated syntax should work just fine.
regards, tom lane
The documentation says to use:
include 'filename'
Which fails with a generic error.What generic error?
Error: Invalid line 496 in /etc/postgresql/8.3/main/postgresql.conf: »include 'filename' « failed!
Correct syntax is:
include = 'filename'The stated syntax should work just fine.
Ok. This is with a Debian PostgreSQL 8.3. I did have a look through
the debian diffs before submittig the report and didn't find anything
immediately obvious that would break the include directive. That said
perhaps it has been changed in CVS; I didn't test that, but only had a
quick look at the code.
Since I thought the lack of = was indeed incorrect syntax I claimed
CVS in the bug report since the documentation has that syntax in CVS,
but I didn't test the CVS version of the backend. I'll see about doing
that but it's going to have to wait a bit...
--
/ Peter Schuller
PGP userID: 0xE9758B7D or 'Peter Schuller <peter.schuller@infidyne.com>'
Key retrieval: Send an E-Mail to getpgpkey@scode.org
E-Mail: peter.schuller@infidyne.com Web: http://www.scode.org
Peter Schuller <peter.schuller@infidyne.com> writes:
The documentation says to use:
include 'filename'
Which fails with a generic error.What generic error?
Error: Invalid line 496 in /etc/postgresql/8.3/main/postgresql.conf: »include 'filename' « failed!
This is with a Debian PostgreSQL 8.3.
There is no such error message in Postgres 8.3 (or any other version).
I speculate that you are dealing with some bit of Debian-provided script
that tries to parse the config file but doesn't know enough to do it
correctly.
regards, tom lane
What generic error?
Error: Invalid line 496 in /etc/postgresql/8.3/main/postgresql.conf: »include 'filename' « failed!
This is with a Debian PostgreSQL 8.3.
There is no such error message in Postgres 8.3 (or any other version).
I speculate that you are dealing with some bit of Debian-provided script
that tries to parse the config file but doesn't know enough to do it
correctly.
You are entirely correct, it was the Debian init scripts trying to
parse the config file. My apologies for wasting your time. I should
have confirmed where the error message came from.
--
/ Peter Schuller
PGP userID: 0xE9758B7D or 'Peter Schuller <peter.schuller@infidyne.com>'
Key retrieval: Send an E-Mail to getpgpkey@scode.org
E-Mail: peter.schuller@infidyne.com Web: http://www.scode.org
Peter Schuller wrote:
-- Start of PGP signed section.
What generic error?
Error: Invalid line 496 in /etc/postgresql/8.3/main/postgresql.conf: ??include 'filename' ?? failed!
This is with a Debian PostgreSQL 8.3.
There is no such error message in Postgres 8.3 (or any other version).
I speculate that you are dealing with some bit of Debian-provided script
that tries to parse the config file but doesn't know enough to do it
correctly.You are entirely correct, it was the Debian init scripts trying to
parse the config file. My apologies for wasting your time. I should
have confirmed where the error message came from.
Debian has frustrated us in the past with their imperfect modifications
to our code, so you are not solely at fault. ;-)
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Peter Schuller wrote:
What generic error?
Error: Invalid line 496 in /etc/postgresql/8.3/main/postgresql.conf: »include 'filename' « failed!
This is with a Debian PostgreSQL 8.3.
There is no such error message in Postgres 8.3 (or any other version).
I speculate that you are dealing with some bit of Debian-provided script
that tries to parse the config file but doesn't know enough to do it
correctly.You are entirely correct, it was the Debian init scripts trying to
parse the config file. My apologies for wasting your time. I should
have confirmed where the error message came from.
Forwarded:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=535428
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.