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: Backslash preceding field separator kills import #3775

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

COPY INTO: Backslash preceding field separator kills import #3775

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

Comments

@monetdb-team
Copy link

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

Date: 2015-07-21 13:18:18 +0200
From: @hannesmuehleisen
To: SQL devs <>
Version: 11.19.3 (Oct2014)
CC: @njnes, @drstmane

Last updated: 2015-08-28 13:41:49 +0200

Comment 21032

Date: 2015-07-21 13:18:18 +0200
From: @hannesmuehleisen

User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.132 Safari/537.36
Build Identifier:

Backslashes preceding the field separator lead to import failure in COPY INTO.

Reproducible: Always

Steps to Reproduce:

start transaction;
create table whatgoodisadatabaseifyoucannotimport(a string, b integer);
copy 1 records into whatgoodisadatabaseifyoucannotimport from stdin using delimiters ' ','\n','';
asdf\ 42

rollback;

Actual Results:

Failed to import table (and that's it)

Expected Results:

Backslash should be read as literal backslash.

Comment 21033

Date: 2015-07-21 13:33:04 +0200
From: @drstmane

Oct2014 was still a bit more elaborate on error messages:

sql>start transaction;
auto commit mode: off
sql>create table whatgoodisadatabaseifyoucannotimport(a string, b integer);
operation successful (0.515ms)
sql>copy 1 records into whatgoodisadatabaseifyoucannotimport from stdin using
more>delimiters ' ','\n','';
more>asdf\ 42
missing separator ' ' line 0 expecting 1 got 0 fields
failed to import table
sql>

These apparently got lost on the default branch before the Jul2015 branch was created ...

Comment 21034

Date: 2015-07-21 13:58:22 +0200
From: @hannesmuehleisen

Same error when using the BEST EFFORT flag.

Comment 21035

Date: 2015-07-21 17:19:54 +0200
From: MonetDB Mercurial Repository <>

Changeset 5923731a420d made by Hannes Muehleisen hannes@cwi.nl in the MonetDB repo, refers to this bug.

For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=5923731a420d

Changeset description:

Test for Bug #3775

Comment 21036

Date: 2015-07-22 09:07:22 +0200
From: @njnes

in copy into the '' is treated as escape symbol. Looking into the missing error.

Comment 21039

Date: 2015-07-22 10:20:38 +0200
From: MonetDB Mercurial Repository <>

Changeset b26c48634f0d made by Niels Nes niels@cwi.nl in the MonetDB repo, refers to this bug.

For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=b26c48634f0d

Changeset description:

added tests for bugs 3775 and 3773

Comment 21188

Date: 2015-08-28 13:41:49 +0200
From: @sjoerdmullender

Jul2015 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