Re: VACUUM fails to parse 0 and 1 as boolean value

From: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, Robert Haas <robertmhaas(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: VACUUM fails to parse 0 and 1 as boolean value
Date: 2019-05-21 02:41:08
Message-ID: CAD21AoD7=7GEGo7e-XyPP=qkrfGamv2MQpHGqMu_Cf7gWCrR+Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, May 21, 2019 at 2:10 AM Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>
> On Fri, May 17, 2019 at 10:21 AM Kyotaro HORIGUCHI
> <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp> wrote:
> >
> > We now have several syntax elements seemingly the same but behave
> > different way.
> >
> > At Thu, 16 May 2019 15:29:36 -0400, Robert Haas <robertmhaas(at)gmail(dot)com> wrote in <CA+TgmobK1ngid9Pxs7g8RFQDH+O1X4yyL+vMQtaV7i6m-Xn0rw(at)mail(dot)gmail(dot)com>
> > > On Thu, May 16, 2019 at 2:56 PM Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
> > > > Yes. Thanks for the comment!
> > > > Attached is the updated version of the patch.
> > > > It adds such common rule.
> > >
> > > I'm not sure how much value it really has to define
> > > opt_boolean_or_string_or_numeric. It saves 1 line of code in each of
> > > 3 places, but costs 6 lines of code to have it.
> >
> > ANALYZE (options) desn't accept 1/0 but only accepts true/false
> > or on/off. Why are we going to make VACUUM differently?
> >
> > And the documentation for ANALYZE doesn't mention the change.
>
> Commit 41b54ba78e seems to affect also ANALYZE syntax.
> If it's intentional, IMO we should apply the attached patch.
> Thought?
>

+1
Thank you for the patch!

Regards,

--
Masahiko Sawada
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2019-05-21 03:00:36 Re: behaviour change - default_tablesapce + partition table
Previous Message David Rowley 2019-05-21 02:37:10 Re: Compile using the Visual Studio 2019