Parsing bool type value

From: Sawada Masahiko <sawada(dot)mshk(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Parsing bool type value
Date: 2013-08-20 07:41:06
Message-ID: CAD21AoDWG3car9gFd5n-cqUbAp33gxWzbGuyj4DWDYswdZR79g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all,

Taking a look at PostgreSQL HEAD today, I noticed that currently
PostgreSQL allows "of" value as bool type value.
So user can execute the following SQL.

=# SET enbale_seqscan TO of;

And I read the source code related to parsing bool value.
It compare TWO characters "off" and the setting value in
parse_bool_with_len() function.
Should we deny the "of" value as bool type value?

Regards,

-------
Sawada Masahiko

Attachment Content-Type Size
parse_bool_with_len.patch application/octet-stream 486 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Boszormenyi Zoltan 2013-08-20 09:47:55 Re: Extension Templates S03E11
Previous Message amulsul 2013-08-20 07:15:40 Re: undefined symbol: PQescapeLiteral