Re: [Maria-discuss] Column named 'row_number' gives error in 10.11
On 2023/04/02 10:29, Antony Stone wrote: See https://mariadb.com/kb/en/window-functions/ and select the box down on the left-hand side "MariaDB starting with 10.5.0" - you'll find that row_number is no longer highlighted, indicating to me that it was not an available function in that version of MariaDB. Antony. This is not the correct interpretation. Checking "MariaDB starting with 10.5.0" will highlight all pages/sections that were introduced in 10.5.0. If version information is not shown, it means that the text applies to all maintained versions (currently 10.3+). The ROW_NUMBER function was actually introduced in 10.2. ___ Mailing list: https://launchpad.net/~maria-discuss Post to : maria-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-discuss More help : https://help.launchpad.net/ListHelp
Re: [Maria-discuss] Column named 'row_number' gives error in 10.11
Hi, Keith, On Apr 02, Keith Edmunds wrote: > > I can't say I'm impressed with a "patch" which eliminates something > > like this from the list of reserved words. They are, after all, > > reserved for a reason. > > I'm not impressed that a point release introduces a reserved word that > will undoubtedly clash with existing apps, but hey, we are where we > are. It was done in 10.7.1, part of the feature https://mariadb.com/kb/en/get-diagnostics/#row_number Every minor MariaDB release comes with new features, patch releases don't. In this case, in particular, ROW_NUMBER is a reserved keyword according to the SQL Standard (see the rule in the part 2). Using reserved words as identifiers is generally discouraged, even if a particular implementation allows that in a particular release. Regards, Sergei VP of MariaDB Server Engineering and secur...@mariadb.org ___ Mailing list: https://launchpad.net/~maria-discuss Post to : maria-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-discuss More help : https://help.launchpad.net/ListHelp
Re: [Maria-discuss] Column named 'row_number' gives error in 10.11
> I can't say I'm impressed with a "patch" which eliminates something like > this from the list of reserved words. They are, after all, reserved for > a reason. I'm not impressed that a point release introduces a reserved word that will undoubtedly clash with existing apps, but hey, we are where we are. ___ Mailing list: https://launchpad.net/~maria-discuss Post to : maria-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-discuss More help : https://help.launchpad.net/ListHelp
Re: [Maria-discuss] Column named 'row_number' gives error in 10.11
On Sunday 02 April 2023 at 10:54:25, Keith Edmunds wrote: > SQLAlchemy workaround and patch here: > https://github.com/sqlalchemy/sqlalchemy/discussions/9585 Fair enough. I can't say I'm impressed with a "patch" which eliminates something like this from the list of reserved words. They are, after all, reserved for a reason. However, if this works for you, that's good. Personally I would have renamed the column to "row_num", "rownum", "rownumber" or similar... Antony. -- 90% of networking problems are routing problems. 9 of the remaining 10% are routing problems in the other direction. The remaining 1% might be something else, but check the routing anyway. Please reply to the list; please *don't* CC me. ___ Mailing list: https://launchpad.net/~maria-discuss Post to : maria-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-discuss More help : https://help.launchpad.net/ListHelp
Re: [Maria-discuss] Column named 'row_number' gives error in 10.11
SQLAlchemy workaround and patch here: https://github.com/sqlalchemy/sqlalchemy/discussions/9585 ___ Mailing list: https://launchpad.net/~maria-discuss Post to : maria-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-discuss More help : https://help.launchpad.net/ListHelp
Re: [Maria-discuss] Column named 'row_number' gives error in 10.11
On Saturday 01 April 2023 at 22:57:46, Keith Edmunds wrote: > > "row_number" is a pre-defined function name and therefore cannot be used > > unquoted as a column name. > > It could in 10.5 when I believe row_number was also a function. I've confirmed on a 10.5.18 instance I have here that row_number *can* be used as a column name, however I don't believe it was an available window function. > This is a change 10.5 → 10.11 See https://mariadb.com/kb/en/window-functions/ and select the box down on the left-hand side "MariaDB starting with 10.5.0" - you'll find that row_number is no longer highlighted, indicating to me that it was not an available function in that version of MariaDB. Antony. -- What do you get when you cross a joke with a rhetorical question? Please reply to the list; please *don't* CC me. ___ Mailing list: https://launchpad.net/~maria-discuss Post to : maria-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-discuss More help : https://help.launchpad.net/ListHelp
Re: [Maria-discuss] Column named 'row_number' gives error in 10.11
> "row_number" is a pre-defined function name and therefore cannot be used > unquoted as a column name. It could in 10.5 when I believe row_number was also a function. This is a change 10.5 → 10.11 ___ Mailing list: https://launchpad.net/~maria-discuss Post to : maria-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-discuss More help : https://help.launchpad.net/ListHelp
Re: [Maria-discuss] Column named 'row_number' gives error in 10.11
On Saturday 01 April 2023 at 21:39:17, Keith Edmunds wrote: > I have a table that includes an int column named row_number. "row_number" is a pre-defined function name and therefore cannot be used unquoted as a column name. https://mariadb.com/kb/en/row_number/ Antony. -- Ramdisk is not an installation procedure. Please reply to the list; please *don't* CC me. ___ Mailing list: https://launchpad.net/~maria-discuss Post to : maria-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-discuss More help : https://help.launchpad.net/ListHelp