MonetDB: reserved SQL keywords

martin van dinther martin.van.dinther at
Thu Dec 10 18:46:47 CET 2015

Hi Hannes,

FYI, we have a system table  sys.keywords  with all the reserved SQL 
The intention of this table is to have one place (in the server) with 
all the reserved SQL keywords, such that API implementations (ODBC, 
JDBC, PHP, Ruby, Python, R, etc) can query that table and construct the 
list or string.
In the default branch I have implemented this already for 
jdbc/ method getSQLKeywords().

This should reduce future maintenance of all the places where these 
reserved SQL keywords are hardcoded. The new keywords can simply be 
added/ in one place, the keywords table.
It is filled in sql/scripts/51_sys_schema_extension.sql

Martin van Dinther

On 24-11-15 09:42, Hannes Muehleisen wrote:
> Changeset: c0fb9a0d91e3 for MonetDB
> URL:;node=c0fb9a0d91e3
> Modified Files:
> 	clients/R/MonetDB.R/R/dbi.R
> Branch: embedded
> Log Message:
> R Connector: More naughty words
> diffs (65 lines):
> diff --git a/clients/R/MonetDB.R/R/dbi.R b/clients/R/MonetDB.R/R/dbi.R
> --- a/clients/R/MonetDB.R/R/dbi.R
> +++ b/clients/R/MonetDB.R/R/dbi.R
> @@ -391,24 +391,43 @@ setMethod("dbSendQuery", signature(conn=
>     invisible(new("MonetDBEmbeddedResult", env=env))
>     })
> -
> -reserved_monetdb_keywords <- c(.SQL92Keywords,
> +# found from sql_scan.c and trial/error
> +reserved_monetdb_keywords <- sort(unique(toupper(c(.SQL92Keywords,
> +"NOW", "NULL", "NULLIF", "NUMERIC", "OF", "OFFSET", "OLD", "ON",
>   # quoting
>   quoteIfNeeded <- function(conn, x, warn=T, ...) {
> _______________________________________________
> checkin-list mailing list
> checkin-list at

More information about the developers-list mailing list