summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2017-09-26 13:12:13 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2017-09-26 13:14:46 -0400
commit984c92074d84a81dc17e9865fc79e264eb50ad61 (patch)
treeb7ced89425bafcf75d3ad1066ff4d9f52022419d /doc/src
parent1635e80d30b16df98aebead12f2b82f17efd9bc8 (diff)
Remove heuristic same-transaction test from check_safe_enum_use().
The blacklist mechanism added by the preceding commit directly fixes most of the practical cases that the same-transaction test was meant to cover. What remains is use-cases like begin; create type e as enum('x'); alter type e add value 'y'; -- use 'y' somehow commit; However, because the same-transaction test is heuristic, it fails on small variants of that, such as renaming the type or changing its owner. Rather than try to explain the behavior to users, let's remove it and just have a rule that the newly added value can't be used before being committed, full stop. Perhaps later it will be worth the implementation effort and overhead to have a more accurate test for type-was-created-in-this-transaction. We'll wait for some field experience with v10 before deciding to do that. Back-patch to v10. Discussion: https://postgr.es/m/20170922185904.1448.16585@wrigleys.postgresql.org
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/ref/alter_type.sgml3
1 files changed, 1 insertions, 2 deletions
diff --git a/doc/src/sgml/ref/alter_type.sgml b/doc/src/sgml/ref/alter_type.sgml
index 446e08b1759..7e2258e1e34 100644
--- a/doc/src/sgml/ref/alter_type.sgml
+++ b/doc/src/sgml/ref/alter_type.sgml
@@ -292,8 +292,7 @@ ALTER TYPE <replaceable class="PARAMETER">name</replaceable> RENAME VALUE <repla
<para>
If <command>ALTER TYPE ... ADD VALUE</> (the form that adds a new value to
an enum type) is executed inside a transaction block, the new value cannot
- be used until after the transaction has been committed, except in the case
- that the enum type itself was created earlier in the same transaction.
+ be used until after the transaction has been committed.
</para>
<para>