Am 26.05.2017 um 14:07 schrieb doganmeh:
I tried varchar(12) also, nothing changed. My questions is 1) I have 672x12=8,064 characters in the first row (which are actually the headers), why would it complain that it is 8760. I am assuming here type `text` occupies 1 byte for a character.
please consider special chars, a little example: test=*# create table demo(id int, t text); CREATE TABLE test=*# insert into demo values (1, '123') test-# ; INSERT 0 1 test=*# insert into demo values (2, '€€€'); INSERT 0 1 test=*# select id, t, length(t), pg_column_size(t) from demo; id | t | length | pg_column_size ----+-----+--------+---------------- 1 | 123 | 3 | 4 2 | €€€ | 3 | 10 (2 Zeilen) -- 2ndQuadrant - The PostgreSQL Support Company. www.2ndQuadrant.com -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general