BUG #14448: create table as values - type check skipped

From: hmahmood89(at)googlemail(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #14448: create table as values - type check skipped
Date: 2016-12-05 14:30:37
Message-ID: 20161205143037.4377.60754@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message VICTOR MIGUEL MORALES CAYUELA 2016-12-05 14:37:22 Re: Segmentation fault in PQexec
Previous Message Pavel Stehule 2016-12-04 18:19:39 Re: BUG #14446: make_date with negative year