• Tom Lane's avatar
    Fix handling of partition bounds for boolean partitioning columns. · 4df58f7e
    Tom Lane authored
    Previously, you could partition by a boolean column as long as you
    spelled the bound values as string literals, for instance FOR VALUES
    IN ('t').  The trouble with this is that ruleutils.c printed that as
    FOR VALUES IN (TRUE), which is reasonable syntax but wasn't accepted by
    the grammar.  That results in dump-and-reload failures for such cases.
    
    Apply a minimal fix that just causes TRUE and FALSE to be converted to
    strings 'true' and 'false'.  This is pretty grotty, but it's too late for
    a more principled fix in v11 (to say nothing of v10).  We should revisit
    the whole issue of how partition bound values are parsed for v12.
    
    Amit Langote
    
    Discussion: https://postgr.es/m/e05c5162-1103-7e37-d1ab-6de3e0afaf70@lab.ntt.co.jp
    4df58f7e
alter_table.sgml 65 KB