Why char datatype is converted to bpchar automatically?

99封情书 提交于 2020-07-08 07:22:08

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!