Navigation Menu

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 ..." - escape of string quotes #3393

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

"COPY .. INTO ..." - escape of string quotes #3393

monetdb-team opened this issue Nov 30, 2020 · 0 comments
Labels
bug Something isn't working normal SQL

Comments

@monetdb-team
Copy link

Date: 2013-11-04 15:20:21 +0100
From: Pete Hollobon <>
To: SQL devs <>
Version: 11.15.19 (Feb2013-SP6)
CC: pete

Last updated: 2014-02-20 15:02:39 +0100

Comment 19319

Date: 2013-11-04 15:20:21 +0100
From: Pete Hollobon <>

User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36
Build Identifier:

When using COPY ... INTO ..., using a non-standard string quote, any instances of that quote character in tables are not escaped, but the default string quote (") is escaped.

Reproducible: Always

Steps to Reproduce:

create table pete_test.dumptest (a clob, b clob);
insert into pete_test.dumptest values ('one|two', 'three"four');
COPY (SELECT * FROM pete_test.dumptest) INTO STDOUT DELIMITERS ',', '\n', '|';

Actual Results:

&1 0 1 2 1
% pete_test.dumptest, pete_test.dumptest table_name
% a, b name
% clob, clob type
% 7, 10 length
% 0 0, 0 0 typesizes
|one|two|,|three"four|
&2 1 -1

Expected Results:

|one|two|,|three"four|

Comment 19322

Date: 2013-11-05 11:24:10 +0100
From: Pete Hollobon <>

The same issue exists for non-standard record separators - newline is always escaped, the actual record separator used is not.

Comment 19389

Date: 2013-12-03 14:24:45 +0100
From: MonetDB Mercurial Repository <>

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

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

Changeset description:

Propagate quotes and separators down to "tostr" function.
Added test as well.
This fixes bug #3393.

Comment 19390

Date: 2013-12-03 14:25:19 +0100
From: @sjoerdmullender

Fixed in Jan2014 branch since it involves an ABI change.

Comment 19602

Date: 2014-02-20 15:02:39 +0100
From: @sjoerdmullender

Jan2014 has been released.

@monetdb-team monetdb-team added bug Something isn't working normal SQL labels Nov 30, 2020
@sjoerdmullender sjoerdmullender added this to the Ancient Release milestone Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working normal SQL
Projects
None yet
Development

No branches or pull requests

2 participants