My field is defined as follows
"COLUMNNAME" character(9)
I import CSV files using the following command
copy "TABLE" from '/my/directory' DELIMITERS ',' CSV;
If I have a string such as 'ABCDEF'
Postgres pads it out to 'ABCDEF '
. How can I stop it from 开发者_开发知识库doing this?
it is because you have char instead of varchar. change type of your column into varchar and everything will be fine
精彩评论