The following bug has been logged on the website:
Bug reference: 14448
Logged by: Hassan Mahmood
Email address: hmahmood89(at)googlemail(dot)com
PostgreSQL version: 9.6.1
Operating system: Windows 7x64
Description:
drop table if exists product_codes;
create temporary table product_codes as select *
from (
values
('abcdefg'::character varying(20)),
('012345678901234567ABCDEFGHIJKLMN')
) csv_data (product_code);
select *
from product_codes;
I would expect that the type check got applied across all values or that the
value got truncated.
The result column states "character varying(20)". Inserts/Updates/Casts all
truncate as expected.