forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit5f0adec
committed
Make STRING an unreserved_keyword.
Commit1a36bc9 (SQL/JSON query functions) introduced STRING as atype_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 specsays 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, specificallythose that use "string" as a typedef name. It turns out this isbecause portions of the ECPG grammar allow type_func_name_keywordsbut not unreserved_keywords as typedef names. That's pretty horrid,and it's mildly astonishing that we've not heard complaints about itbefore. We can fix two of those uses trivially, but the ones in thevar_type production are less easy. As a stopgap, hard-code STRING asan allowed alternative in var_type.Per report from Alastair McKinley.Discussion:https://postgr.es/m/3661437.1653855582@sss.pgh.pa.us1 parenta8cca60 commit5f0adec
File tree
3 files changed
+41
-4
lines changed- src
- backend/parser
- include/parser
- interfaces/ecpg/preproc
3 files changed
+41
-4
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
17940 | 17940 |
| |
17941 | 17941 |
| |
17942 | 17942 |
| |
| 17943 | + | |
17943 | 17944 |
| |
17944 | 17945 |
| |
17945 | 17946 |
| |
| |||
18098 | 18099 |
| |
18099 | 18100 |
| |
18100 | 18101 |
| |
18101 |
| - | |
18102 | 18102 |
| |
18103 | 18103 |
| |
18104 | 18104 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
426 | 426 |
| |
427 | 427 |
| |
428 | 428 |
| |
429 |
| - | |
| 429 | + | |
430 | 430 |
| |
431 | 431 |
| |
432 | 432 |
| |
|
Lines changed: 39 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
467 | 467 |
| |
468 | 468 |
| |
469 | 469 |
| |
470 |
| - | |
| 470 | + | |
471 | 471 |
| |
472 | 472 |
| |
473 | 473 |
| |
| |||
701 | 701 |
| |
702 | 702 |
| |
703 | 703 |
| |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
704 | 741 |
| |
705 | 742 |
| |
706 | 743 |
| |
| |||
1342 | 1379 |
| |
1343 | 1380 |
| |
1344 | 1381 |
| |
1345 |
| - | |
| 1382 | + | |
1346 | 1383 |
| |
1347 | 1384 |
| |
1348 | 1385 |
| |
|
0 commit comments
Comments
(0)