Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

copy into ignore null as directive if first column doesn't come from file #6532

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments
Closed

Comments

@monetdb-team
Copy link

@monetdb-team monetdb-team commented Nov 30, 2020

Date: 2018-02-04 18:46:54 +0100
From: @sjoerdmullender
To: SQL devs <>
Version: 11.27.11 (Jul2017-SP3)

Last updated: 2018-03-29 15:39:23 +0200

Comment 26161

Date: 2018-02-04 18:46:54 +0100
From: @sjoerdmullender

Comment 26162

Date: 2018-02-04 18:53:10 +0100
From: @sjoerdmullender

The following creates a table and insert one row where the first column is filled in using the default value (a sequence) and the other columns come from a file. When doing this, the NULL AS blurb gets ignored.

create table t (id int auto_increment, a clob, b clob);
copy 1 records into t (a, b) from stdin (id, a, b) using delimiters ',','\n','"' null as '';
2,,

select * from t;
this now results in a row with values id=1, a='', b='' instead of id=1,a=NULL,b=NULL.

Comment 26163

Date: 2018-02-04 18:54:37 +0100
From: @sjoerdmullender

The first column must be in the file, but it must be ignored by the COPY IN.

Comment 26164

Date: 2018-02-04 22:36:20 +0100
From: MonetDB Mercurial Repository <>

Changeset e2fda4b58c9f made by Sjoerd Mullender sjoerd@acm.org in the MonetDB repo, refers to this bug.

For complete details, see https//devmonetdborg/hg/MonetDB?cmd=changeset;node=e2fda4b58c9f

Changeset description:

Don't skip checking for nullstr when skipping first column.
This fixes bug #6532.

Comment 26323

Date: 2018-03-29 15:39:23 +0200
From: @sjoerdmullender

The Mar2018 version has been released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant