Avoid promising that "ADD COLUMN ... DEFAULT NULL" is free

Enterprise / PostgreSQL - Tom Lane [sss.pgh.pa.us] - 3 April 2014 11:38 UTC

The system realizes that DEFAULT NULL is dummy in simple cases, but not if a cast function (such as a length coercion) needs to be applied. It's dubious that suppressing that function call would be appropriate, anyway. For the moment, let's just adjust the docs to say that you should omit the DEFAULT clause if you don't want a rewrite to happen. Per gripe from Amit Langote.

879808e Avoid promising that "ADD COLUMN ... DEFAULT NULL" is free.
doc/src/sgml/ref/alter_table.sgml | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)

Upstream: git.postgresql.org


  • Share