pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Fix handling of partition bounds for boolean partitioning column
2+ messages / 1 participants
[nested] [flat]
* pgsql: Fix handling of partition bounds for boolean partitioning column
@ 2018-04-23 19:29 Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2018-04-23 19:29 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Fix handling of partition bounds for boolean partitioning columns.
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
Branch
------
REL_10_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/1222db999dc8ad055e0320dd6704d814acca3b51
Modified Files
--------------
doc/src/sgml/ref/create_table.sgml | 6 +++---
src/backend/parser/gram.y | 2 ++
src/test/regress/expected/create_table.out | 14 ++++++++++++++
src/test/regress/sql/create_table.sql | 7 +++++++
4 files changed, 26 insertions(+), 3 deletions(-)
^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Fix handling of partition bounds for boolean partitioning column
@ 2018-04-23 19:29 Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2018-04-23 19:29 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Fix handling of partition bounds for boolean partitioning columns.
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
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/4df58f7ed7f9ddc5a3196fcbad35690d1b3218de
Modified Files
--------------
doc/src/sgml/ref/alter_table.sgml | 6 +++---
doc/src/sgml/ref/create_table.sgml | 6 +++---
src/backend/parser/gram.y | 2 ++
src/test/regress/expected/create_table.out | 14 ++++++++++++++
src/test/regress/sql/create_table.sql | 7 +++++++
5 files changed, 29 insertions(+), 6 deletions(-)
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2018-04-23 19:29 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-04-23 19:29 pgsql: Fix handling of partition bounds for boolean partitioning column Tom Lane <tgl@sss.pgh.pa.us>
2018-04-23 19:29 pgsql: Fix handling of partition bounds for boolean partitioning column Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox