mirror of
https://github.com/postgres/postgres.git
synced 2025-07-03 20:02:46 +03:00
Fix previous patch to exprTypmod.
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.163.2.2 2005/05/24 23:15:05 ishii Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.163.2.3 2005/05/25 02:13:48 ishii Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -1358,11 +1358,11 @@ exprTypmod(Node *expr)
|
||||
case BPCHAROID:
|
||||
if (!con->constisnull)
|
||||
{
|
||||
int32 len = VARSIZE(DatumGetPointer(con->constvalue));
|
||||
int32 len = VARSIZE(DatumGetPointer(con->constvalue)) - VARHDRSZ;
|
||||
|
||||
if (pg_database_encoding_max_length() > 1)
|
||||
len = pg_mbstrlen_with_len(VARDATA(DatumGetPointer(con->constvalue)), len);
|
||||
return len;
|
||||
return len + VARHDRSZ;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
Reference in New Issue
Block a user