1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-17 17:02:08 +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_relation.c,v 1.20 1999/05/17 17:03:34 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/parse_relation.c,v 1.21 1999/05/22 04:12:28 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -445,7 +445,9 @@ checkTargetTypes(ParseState *pstate, char *target_colname,
{
if (can_coerce_type(1, &attrtype_id, &attrtype_target))
{
Node *expr = coerce_type(pstate, expr, attrtype_id, attrtype_target);
Node *expr = coerce_type(pstate, expr, attrtype_id,
attrtype_target,
get_atttypmod(pstate->p_target_relation->rd_id, resdomno_target));
elog(ERROR, "Type %s(%d) can be coerced to match target column %s(%d)",
colname, get_atttypmod(rte->relid, resdomno_id),