1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-27 00:12:01 +03:00

In ALTER COLUMN TYPE, strip any implicit coercion operations appearing

at the top level of the column's old default expression before adding
an implicit coercion to the new column type.  This seems to satisfy the
principle of least surprise, as per discussion of bug #1290.
This commit is contained in:
Tom Lane
2004-10-22 17:20:05 +00:00
parent 4733dcc592
commit 9309d5f2ba
4 changed files with 65 additions and 5 deletions

View File

@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/include/optimizer/clauses.h,v 1.75 2004/08/29 04:13:07 momjian Exp $
* $PostgreSQL: pgsql/src/include/optimizer/clauses.h,v 1.76 2004/10/22 17:20:05 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -63,6 +63,8 @@ extern bool has_distinct_on_clause(Query *query);
extern int NumRelids(Node *clause);
extern void CommuteClause(OpExpr *clause);
extern Node *strip_implicit_coercions(Node *node);
extern void set_coercionform_dontcare(Node *node);
extern Node *eval_const_expressions(Node *node);