14

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

1 Answer 1

23

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)

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.