pgsql: Make STRING an unreserved_keyword.
От | Tom Lane |
---|---|
Тема | pgsql: Make STRING an unreserved_keyword. |
Дата | |
Msg-id | E1nvjlk-001uEh-5i@gemulon.postgresql.org обсуждение исходный текст |
Список | pgsql-committers |
Make STRING an unreserved_keyword. Commit 1a36bc9db (SQL/JSON query functions) introduced STRING as a type_func_name_keyword, thereby breaking applications that use "string" as a table name, column name, function parameter name, etc. That seems like a pretty bad thing, not least because the SQL spec says that STRING is an unreserved keyword. This is easy enough to fix so far as the core grammar is concerned. However, doing so causes some ECPG test cases to fail, specifically those that use "string" as a typedef name. It turns out this is because portions of the ECPG grammar allow type_func_name_keywords but not unreserved_keywords as typedef names. That's pretty horrid, and it's mildly astonishing that we've not heard complaints about it before. We can fix two of those uses trivially, but the ones in the var_type production are less easy. As a stopgap, hard-code STRING as an allowed alternative in var_type. Per report from Alastair McKinley. Discussion: https://postgr.es/m/3661437.1653855582@sss.pgh.pa.us Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/5f0adec2537dab531ef63ff6e0fe640698a291d9 Modified Files -------------- src/backend/parser/gram.y | 2 +- src/include/parser/kwlist.h | 2 +- src/interfaces/ecpg/preproc/ecpg.trailer | 41 ++++++++++++++++++++++++++++++-- 3 files changed, 41 insertions(+), 4 deletions(-)
В списке pgsql-committers по дате отправления: