提交 fe0154ba 编写于 作者: B Bruce Momjian

FIx for varchar(), char() and INSERT .. SELECT.

上级 4eb1ee29
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_relation.c,v 1.8 1998/01/20 22:12:01 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/parse_relation.c,v 1.9 1998/02/05 22:48:44 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -439,12 +439,12 @@ checkTargetTypes(ParseState *pstate, char *target_colname, ...@@ -439,12 +439,12 @@ checkTargetTypes(ParseState *pstate, char *target_colname,
if (attrtype_id == BPCHAROID && if (attrtype_id == BPCHAROID &&
get_atttypmod(rte->relid, resdomno_id) != get_atttypmod(rte->relid, resdomno_id) !=
get_atttype(pstate->p_target_relation->rd_id, resdomno_target)) get_atttypmod(pstate->p_target_relation->rd_id, resdomno_target))
elog(ERROR, "Length of %s is longer than length of target column %s", elog(ERROR, "Length of %s is not equal to the length of target column %s",
colname, target_colname); colname, target_colname);
if (attrtype_id == VARCHAROID && if (attrtype_id == VARCHAROID &&
get_atttypmod(rte->relid, resdomno_id) > get_atttypmod(rte->relid, resdomno_id) >
get_atttype(pstate->p_target_relation->rd_id, resdomno_target)) get_atttypmod(pstate->p_target_relation->rd_id, resdomno_target))
elog(ERROR, "Length of %s is longer than length of target column %s", elog(ERROR, "Length of %s is longer than length of target column %s",
colname, target_colname); colname, target_colname);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册