forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit58640f3
committed
Remove useless character-length checks in contrib/ltree.
The t_iseq() macro does not need to be guarded by a characterlength check (at least when the comparison value is an ASCIIcharacter, as its documentation requires). Some portions ofcontrib/ltree hadn't read that memo, so simplify them.The last change in gettoken_query,- else if (charlen == 1 && !t_iseq(state->buf, ' '))+ else if (!t_iseq(state->buf, ' '))looks like it's actually a bug fix: I doubt that the intentionwas to silently ignore multibyte characters as if they werewhitespace. I'm not tempted to back-patch though, because thiswill have the effect of tightening what is allowed in ltxtquerystrings.Discussion:https://postgr.es/m/2548310.1664999615@sss.pgh.pa.us1 parentca71131 commit58640f3
3 files changed
+13
-14
lines changedLines changed: 4 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
25 | 25 |
| |
26 | 26 |
| |
27 | 27 |
| |
28 |
| - | |
29 | 28 |
| |
30 |
| - | |
31 |
| - | |
| 29 | + | |
| 30 | + | |
32 | 31 |
| |
33 | 32 |
| |
34 | 33 |
| |
35 | 34 |
| |
36 | 35 |
| |
37 |
| - | |
38 |
| - | |
| 36 | + | |
| 37 | + | |
39 | 38 |
| |
40 | 39 |
| |
41 | 40 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
126 | 126 |
| |
127 | 127 |
| |
128 | 128 |
| |
129 |
| - | |
| 129 | + | |
130 | 130 |
| |
131 | 131 |
| |
132 | 132 |
| |
|
Lines changed: 8 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
64 | 64 |
| |
65 | 65 |
| |
66 | 66 |
| |
67 |
| - | |
| 67 | + | |
68 | 68 |
| |
69 | 69 |
| |
70 | 70 |
| |
71 | 71 |
| |
72 | 72 |
| |
73 |
| - | |
| 73 | + | |
74 | 74 |
| |
75 | 75 |
| |
76 | 76 |
| |
| |||
97 | 97 |
| |
98 | 98 |
| |
99 | 99 |
| |
100 |
| - | |
| 100 | + | |
101 | 101 |
| |
102 |
| - | |
| 102 | + | |
103 | 103 |
| |
104 |
| - | |
| 104 | + | |
105 | 105 |
| |
106 | 106 |
| |
107 | 107 |
| |
| |||
110 | 110 |
| |
111 | 111 |
| |
112 | 112 |
| |
113 |
| - | |
| 113 | + | |
114 | 114 |
| |
115 | 115 |
| |
116 | 116 |
| |
117 | 117 |
| |
118 | 118 |
| |
119 | 119 |
| |
120 |
| - | |
| 120 | + | |
121 | 121 |
| |
122 | 122 |
| |
123 | 123 |
| |
124 | 124 |
| |
125 | 125 |
| |
126 | 126 |
| |
127 | 127 |
| |
128 |
| - | |
| 128 | + | |
129 | 129 |
| |
130 | 130 |
| |
131 | 131 |
| |
|
0 commit comments
Comments
(0)