8000 FIx for varchar(), char() and INSERT .. SELECT. · postgrespro/postgres_cluster@fe0154b · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

< 8000 /qbsearch-input>
Appearance settings

Commit fe0154b

Browse files
committed
FIx for varchar(), char() and INSERT .. SELECT.
1 parent 4eb1ee2 commit fe0154b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/backend/parser/parse_relation.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/parser/parse_relation.c,v 1.8 1998/01/20 22:12:01 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/parser/parse_relation.c,v 1.9 1998/02/05 22:48:44 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -439,12 +439,12 @@ checkTargetTypes(ParseState *pstate, char *target_colname,
439439

440440
if (attrtype_id == BPCHAROID &&
441441
get_atttypmod(rte->relid, resdomno_id) !=
442-
get_atttype(pstate->p_target_relation->rd_id, resdomno_target))
443-
elog(ERROR, "Length of %s is longer than length of target column %s",
442+
get_atttypmod(pstate->p_target_relation->rd_id, resdomno_target))
443+
elog(ERROR, "Length of %s is not equal to the length of target column %s",
444444
colname, target_colname);
445445
if (attrtype_id == VARCHAROID &&
446446
get_atttypmod(rte->relid, resdomno_id) >
447-
get_atttype(pstate->p_target_relation->rd_id, resdomno_target))
447+
get_atttypmod(pstate->p_target_relation->rd_id, resdomno_target))
448448
elog(ERROR, "Length of %s is longer than length of target column %s",
449449
colname, target_colname);
450450

0 commit comments

Comments
 (0)
0