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

MonetDB SQL syntax incompatible with SQL-92 <delimited identifier> syntax #3432

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

Comments

@monetdb-team
Copy link

Date: 2014-02-04 22:30:02 +0100
From: Ken Leese <<ken.leese>>
To: SQL devs <>
Version: 11.17.9 (Jan2014)
CC: @njnes

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

Comment 19532

Date: 2014-02-04 22:30:02 +0100
From: Ken Leese <<ken.leese>>

User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
Build Identifier:

From ISO 9075 SQL/Framework Part 2:
::=
::= ...
::= |
::= !! See the Syntax Rules (below)
6) A is any character of the source language character set other than a .
::= "" !! two consecutive double quote characters

However in file …/sql/server/sql_scan.c, the function valid_ident() does not support the standardized syntax, thus causing fatal incompatibilities with existing popular data visualization offerings. In addition, the function erroneously interprets “\” as an escape character.

Reproducible: Always

Steps to Reproduce:

Two examples simplified from existing ODBC client requests:
-- determine database support for temporary tables
CREATE LOCAL TEMPORARY TABLE "Connect" ("COL" INTEGER) ON COMMIT PRESERVE ROWS
-- Grouping select
SELECT "voyages"."boatname" AS "none:boatname:nk" FROM "sys"."voyages" "voyages" GROUP BY "none:boatname:nk"

Actual Results:

Erroneous syntax error diagnostics

Expected Results:

Support for SQL-92 syntax

Correct syntax for a delimited identifier containing a doublequote is "special""identifier" (NOT "special"identifier" which is incorrect).

Note the comment within …/sql/server/sql_scan.c:
/* Todo check if what valid 'quoted' idents are */

Support for SQL-92 delimited identifier syntax is a requirement for compatibility with existing data visualization client software.

Comment 19547

Date: 2014-02-05 14:38:37 +0100
From: @njnes

adapted the valid_ident too allow any character except " (and monetdb specific, first char shouldn't be a % and length <= 1024)

Comment 19548

Date: 2014-02-05 14:56:29 +0100
From: MonetDB Mercurial Repository <>

Changeset dc5a31561c13 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=dc5a31561c13

Changeset description:

fixed bug #3432, allow for any character in quoted identifiers

Comment 19608

Date: 2014-02-20 15:02:50 +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