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

NULL literals refused at many places #3833

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

NULL literals refused at many places #3833

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


Copy link

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

Date: 2015-10-23 14:32:00 +0200
From: Frédéric Jolliton <<frederic.jolliton+monetdb>>
To: SQL devs <>
Version: 11.21.5 (Jul2015)
CC: @njnes

Last updated: 2015-11-03 10:18:49 +0100

Comment 21387

Date: 2015-10-23 14:32:00 +0200
From: Frédéric Jolliton <<frederic.jolliton+monetdb>>

User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:40.0) Gecko/20100101 Firefox/40.0
Build Identifier:

I'm not sure if the standard cover this, but NULL in MonetDB is recognized only on few places (I'm excluding operators whose name contains NULL, such as "IS NOT NULL").

For examples, the following queries are not parsed successfully:

 SELECT (NULL);   -- but SELECT NULL; is ok!

They all return the following error:

 syntax error, unexpected sqlNULL [..]

(PostgreSQL accepts them all.)

While this might look suspicious to have such a NULL literal in a query, it happens when constructing query programmatically in certains case.

We could replace them with CAST(NULL AS INT) or NULLIF(0,0) for example, but we feel that MonetDB should probably handle that itself if the behavior is covered by the standard.

What do you think?

Reproducible: Always

Comment 21400

Date: 2015-10-24 23:56:23 +0200
From: MonetDB Mercurial Repository <>

Changeset a3b38049ebec made by Niels Nes in the MonetDB repo, refers to this bug.

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

Changeset description:

fixes for bug #3833, we now allow NULL almost everywhere in the
queries (beware NULL != NULL semantics are always inplace)
For equality use IS NULL.

Comment 21401

Date: 2015-10-25 00:04:57 +0200
From: @njnes

Null's are now allowed anywhere, ie were we expect a value.

Comment 21456

Date: 2015-11-03 10:18:49 +0100
From: @sjoerdmullender

Jul2015 SP1 has been released.

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

Successfully merging a pull request may close this issue.

None yet
1 participant