From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Fix ruleutils.c for domain-over-array cases, too. |
Date: | 2017-07-12 22:00:25 |
Message-ID: | E1dVPgH-00042Q-92@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Fix ruleutils.c for domain-over-array cases, too.
Further investigation shows that ruleutils isn't quite up to speed either
for cases where we have a domain-over-array: it needs to be prepared to
look past a CoerceToDomain at the top level of field and element
assignments, else it decompiles them incorrectly. Potentially this would
result in failure to dump/reload a rule, if it looked like the one in the
new test case. (I also added a test for EXPLAIN; that output isn't broken,
but clearly we need more test coverage here.)
Like commit b1cb32fb6, this bug is reachable in cases we already support,
so back-patch all the way.
Branch
------
REL9_6_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/ff2d5372235dae339cbfa04aa55a8458cd6bfab8
Modified Files
--------------
src/backend/utils/adt/ruleutils.c | 41 ++++++++++++++++++++++++++++++++----
src/test/regress/expected/domain.out | 41 ++++++++++++++++++++++++++++++------
src/test/regress/sql/domain.sql | 11 +++++++++-
3 files changed, 81 insertions(+), 12 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2017-07-13 12:49:51 | pgsql: Fix race between GetNewTransactionId and GetOldestActiveTransact |
Previous Message | Heikki Linnakangas | 2017-07-12 19:06:59 | pgsql: Reduce memory usage of tsvector type analyze function. |