Closed as not planned
Description
Nikita Khateev opened SPR-16340 and commented
There is a possible bug while parsing SQL query for PostgreSQL DB. If you will try to execute a named query like this:
UPDATE table SET name = array[:param]
The name of param will be parsed as 'param]', which is incorrect. However, if you will try to execute this query:
UPDATE table SET name = array[:param ]
It will parse param name correctly.
Affects: 5.0.2
Issue Links:
- NamedParameterUtils.parseSqlStatement can't handle quote following comment end [SPR-7958] #12613 NamedParameterUtils.parseSqlStatement can't handle quote following comment end
- [Regression] NamedParameterUtils::parseSqlStatement cannot parse chinese param name [SPR-16473] #21018 [Regression] NamedParameterUtils::parseSqlStatement cannot parse chinese param name
- NamedParameterUtils.isParameterSeparator throws ArrayIndexOutOfBoundsException for non ASCII characters [SPR-16472] #21017 NamedParameterUtils.isParameterSeparator throws ArrayIndexOutOfBoundsException for non ASCII characters
- NamedParameterUtils.parseSqlStatement should parse :{x} style parameter correctly [SPR-16663] #21204 NamedParameterUtils.parseSqlStatement should parse :{x} style parameter correctly
- Expose parameter names from ParsedSql [SPR-16211] #20759 Expose parameter names from ParsedSql
- NamedParameterJdbcTemplate doesn't support postgresql dollar quoting $$ [SPR-16512] #21055 NamedParameterJdbcTemplate doesn't support postgresql dollar quoting $$
- SqlParameterSource needs method for extracting parameter names [SPR-16361] #20908 SqlParameterSource needs method for extracting parameter names
Referenced from: pull request #1637