1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-19 15:49:24 +03:00

Fix for DEFAULT ''.

This commit is contained in:
Bruce Momjian
1999-05-22 04:12:29 +00:00
parent 9710995fc9
commit a8d2820e6d
8 changed files with 40 additions and 45 deletions

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.46 1999/05/18 23:40:05 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.47 1999/05/22 04:12:26 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -417,7 +417,8 @@ transformExpr(ParseState *pstate, Node *expr, int precedence)
}
else if (can_coerce_type(1, &c->casetype, &ptype))
{
c->defresult = coerce_type(pstate, c->defresult, c->casetype, ptype);
c->defresult = coerce_type(pstate, c->defresult,
c->casetype, ptype, -1);
c->casetype = ptype;
}
else
@@ -439,7 +440,8 @@ transformExpr(ParseState *pstate, Node *expr, int precedence)
{
if (can_coerce_type(1, &wtype, &ptype))
{
w->result = coerce_type(pstate, w->result, wtype, ptype);
w->result = coerce_type(pstate, w->result, wtype,
ptype, -1);
}
else
{