Re: BUG #2851: Error in documentation or in code?

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Gurjeet Singh <singh(dot)gurjeet(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2851: Error in documentation or in code?
Date: 2006-12-23 00:52:53
Message-ID: 200612230052.kBN0qrh07606@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


Interesting. The bug was caused because 'on' and 'off' both start with
'o', so the code didn't do tests for partial matches.

The attached, applied patch will do the right thing, checking for at
least two characters for 'on' and 'off'. The fix will appear in 8.3.

---------------------------------------------------------------------------

Gurjeet Singh wrote:
>
> The following bug has been logged online:
>
> Bug reference: 2851
> Logged by: Gurjeet Singh
> Email address: singh(dot)gurjeet(at)gmail(dot)com
> PostgreSQL version: 8.2.0
> Operating system: Windows XP Professional
> Description: Error in documentation or in code?
> Details:
>
> The documentation at
> http://www.postgresql.org/docs/8.2/interactive/config-setting.html states
> that:
>
> Boolean values may be written as ON, OFF, TRUE, FALSE, YES, NO, 1, 0 (all
> case-insensitive) or any unambiguous prefix of these.
>
> But the following doesn't work:
>
> postgres=# set enable_seqscan = of;
> ERROR: parameter "enable_seqscan" requires a Boolean value
> postgres=#
>
> 'of' is an unambiguous prefix of OFF, but it clearly doesn't work. Is it the
> documentation that needs fix or is it the code?
>
> I tried the following too:
>
> set enable_seqscan = "of"; -- doesn't work
> set enable_seqscan = "off"; -- works
>
> BTW, I tried TR, TRU, FA, FAL, FALS, YE. They all work fine.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq

--
Bruce Momjian bruce(at)momjian(dot)us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

Attachment Content-Type Size
/rtmp/diff text/x-diff 891 bytes

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2006-12-23 01:28:31 Re: BUG #2852: User-defined type name begins with the
Previous Message Harry Liu 2006-12-22 19:16:16 BUG #2859: related with BUG #2568: autovacuum locks tables and do nothing