为什么 char 数据类型会自动转换为 bpchar? [英] Why char datatype is converted to bpchar automatically?

查看:126
本文介绍了为什么 char 数据类型会自动转换为 bpchar?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有可能将CHAR数据类型自动转换成bpchar?

Is there any possible to convert CHAR datatype into bpchar automatically?

我们已经看到了从应用程序端选择列datatypeCHAR但数据库级bpchar被创建的场景.

We have seen the scenario which selected column datatype is CHAR from application end but database level bpchar got created.

有人可以帮我吗?

推荐答案

https://www.postgresql.org/docs/current/static/datatype-character.html

character(n), char(n) 定长,空白填充

character(n), char(n) fixed-length, blank padded

在bpchar中有效b代表空白,p代表填充,bpcharchar(n)相同code> 或 character(n),一个空白填充到 n 长度的字符串...

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...

更多引用:

https://www.postgresql.org/docs/current/静态/typeconv-query.html

bpchar(blank-padded char",字符数据的内部名称类型)

bpchar ("blank-padded char", the internal name of the character data type)

这篇关于为什么 char 数据类型会自动转换为 bpchar?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆