Skip to content
Snippets Groups Projects
Commit fe0154ba authored by Bruce Momjian's avatar Bruce Momjian
Browse files

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

parent 4eb1ee29
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@
*
*
* 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,
if (attrtype_id == BPCHAROID &&
get_atttypmod(rte->relid, resdomno_id) !=
get_atttype(pstate->p_target_relation->rd_id, resdomno_target))
elog(ERROR, "Length of %s is longer than length of target column %s",
get_atttypmod(pstate->p_target_relation->rd_id, resdomno_target))
elog(ERROR, "Length of %s is not equal to the length of target column %s",
colname, target_colname);
if (attrtype_id == VARCHAROID &&
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",
colname, target_colname);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment