Bug 6692

Summary: import with COPY INTO and missing column list for csv file has an unclear error message.
Product: SQL Reporter: aris <aris.koning>
Component: allAssignee: SQL devs <bugs-sql>
Status: NEW ---    
Severity: normal    
Priority: Normal    
Version: 11.31.13 (Aug2018-SP2)   
Hardware: Other   
OS: Linux   

Description aris 2019-03-18 10:46:51 CET
User-Agent:       Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:65.0) Gecko/20100101 Firefox/65.0
Build Identifier: 

Say we want to import values from a csv file into a subset of the columns of some table. The user can use undocumented syntax involving column lists to specify where to import what.

However the syntax is a bit verbose and could be improved with some better default behaviour and/or better error handling. Plus there should be an entry in the documentation that specifies how this work because it is a very useful feature to exhibit.

Reproducible: Always

Steps to Reproduce:
1.create table foo (k int auto_increment, i int, s string);
2.copy into foo (i, s) from '/home/aris/Sources/monetdb/sql/test/bugs/Tests/test.csv' delimiters ',', '\n', '''';
Actual Results:  
Failed to import table 'foo', Column value 2 missing

Expected Results:  
2 affected rows --success!
--Use the same column list as specified for the table as a default for the column list associated to the csv file.
Missing mandatory column list associated to csv file.
--or some better message than this

Please also update documentation.