You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks to me like actually generating all numbers from "first" to "last" was the initially intended behaviour - I can't think why one would want to complicate function parameters this way intentionally. A "=" probably slipped off the condition in the loop during implementation. However changing that now would break backward compatibility.
Reproducible: Always
Comment 26475
Date: 2018-06-01 19:30:53 +0200
From: Martin van Dinther <<martin.van.dinther>>
The confusion was (hopefully) taken away by changing the name of the parameter.
Many such generators go from start up to, but not including finish, so it's not so strange to that here as well. Although I also see the merit of aligning with PostgreSQL.
Let's make it a different bug if we really want to change the semantics.
The text was updated successfully, but these errors were encountered:
Date: 2018-05-22 10:26:37 +0200
From: @swingbit
To: MonetDB5 devs <>
Version: 11.27.13 (Jul2017-SP4)
CC: martin.van.dinther, @njnes
Last updated: 2018-08-31 13:23:09 +0200
Comment 26461
Date: 2018-05-22 10:26:37 +0200
From: @swingbit
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36
Build Identifier:
The general form of the generate_series function (in all the integer-size variants) is:
create function sys.generate_series(first int, last int, stepsize int)
Parameters "first" and "last" obviously suggest that the series is from "first" to "last" included.
But it actually is from "first" to ("last" - 1)
sql>select * from sys.generate_series(1,5,1);
+-------+
| value |
+=======+
| 1 |
| 2 |
| 3 |
| 4 |
+-------+
4 tuples (1.241ms)
It looks to me like actually generating all numbers from "first" to "last" was the initially intended behaviour - I can't think why one would want to complicate function parameters this way intentionally. A "=" probably slipped off the condition in the loop during implementation. However changing that now would break backward compatibility.
Reproducible: Always
Comment 26475
Date: 2018-06-01 19:30:53 +0200
From: Martin van Dinther <<martin.van.dinther>>
I agree it should behave similar to Postgresql Series Generating Functions:
https://www.postgresql.org/docs/9.6/static/functions-srf.html
Comment 26594
Date: 2018-08-08 15:17:38 +0200
From: MonetDB Mercurial Repository <>
Changeset e63096367379 made by Sjoerd Mullender sjoerd@acm.org in the MonetDB repo, refers to this bug.
For complete details, see https//devmonetdborg/hg/MonetDB?cmd=changeset;node=e63096367379
Changeset description:
Comment 26606
Date: 2018-08-28 09:42:37 +0200
From: @sjoerdmullender
The confusion was (hopefully) taken away by changing the name of the parameter.
Many such generators go from start up to, but not including finish, so it's not so strange to that here as well. Although I also see the merit of aligning with PostgreSQL.
Let's make it a different bug if we really want to change the semantics.
The text was updated successfully, but these errors were encountered: