兼容MySQL多字符集
This commit is contained in:
@ -459,6 +459,7 @@ Const* make_const(ParseState* pstate, Value* value, int location)
|
||||
Datum val;
|
||||
int64 val64;
|
||||
Oid typid;
|
||||
Oid collid = InvalidOid;
|
||||
int typelen;
|
||||
bool typebyval = false;
|
||||
ParseCallbackState pcbstate;
|
||||
@ -518,6 +519,9 @@ Const* make_const(ParseState* pstate, Value* value, int location)
|
||||
typid = UNKNOWNOID; /* will be coerced later */
|
||||
typelen = -2; /* cstring-style varwidth type */
|
||||
typebyval = false;
|
||||
if (OidIsValid(GetCollationConnection())) {
|
||||
collid = GetCollationConnection();
|
||||
}
|
||||
break;
|
||||
|
||||
case T_BitString:
|
||||
@ -545,7 +549,7 @@ Const* make_const(ParseState* pstate, Value* value, int location)
|
||||
|
||||
con = makeConst(typid,
|
||||
-1, /* typmod -1 is OK for all cases */
|
||||
InvalidOid, /* all cases are uncollatable types */
|
||||
collid, /* all cases are uncollatable types */
|
||||
typelen,
|
||||
val,
|
||||
false,
|
||||
|
||||
Reference in New Issue
Block a user