ITAGAKI Takahiro <itagaki.takah...@oss.ntt.co.jp> wrote: > - Postgres interprets 'on' as true and 'off' as false in configuration > parameters, but they are not accepted in sql-boolean. > Is it a design? or should we add a parser for 'on' and 'off' ? > I'd like to allow 'on' and 'off' in sql-boolean, too.
Here is a patch to allow 'on' and 'off' as input texts for boolean. Duplicated boolean parsers in parse_bool() and boolin() are merged into a new parse_bool_with_len(). I think the change is useful when we treat reloptions in programs. Since human-readable texts are not suitable for programs, we would need conversions from text to boolean. Then the shared parser works well. Regards, --- ITAGAKI Takahiro NTT Open Source Software Center
boolin_accepts_onoff.patch
Description: Binary data
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers