问题
Is there any possible to convert CHAR
datatype into bpchar
automatically?
We have seen the scenario which selected column datatype
is CHAR
from application end but database level bpchar
got created.
Can anyone help me on this?
回答1:
https://www.postgresql.org/docs/current/static/datatype-character.html
character(n), char(n) fixed-length, blank padded
Effectively in bpchar b stands for blank and p stands for padded and bpchar
is same as char(n)
or character(n)
, a blank padded to n
length string...
More quotes:
https://www.postgresql.org/docs/current/static/typeconv-query.html
bpchar (“blank-padded char”, the internal name of the character data type)
来源:https://stackoverflow.com/questions/51421269/why-char-datatype-is-converted-to-bpchar-automatically