forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit8999f5e
committed
Fix write/read of empty string fields in Nodes.
Historically, outToken has represented both NULL and empty-stringstrings as "<>", which readfuncs.c then read as NULL, thus failingto preserve empty-string fields accurately. Remarkably, this hasnot caused any serious problems yet, but let's fix it.We'll keep the "<>" notation for NULL, and use """" for empty string,because that matches other notational choices already in use.An actual input string of """" is converted to "\""" (this was truealready, apparently as a hangover from an ancient time when stringquoting was handled directly by pg_strtok).CHAR fields also use "<>", but for '\0'.Author: Tom Lane <tgl@sss.pgh.pa.us>Discussion:https://www.postgresql.org/message-id/flat/4159834.1657405226@sss.pgh.pa.us1 parentaf51b2f commit8999f5e
2 files changed
+30
-5
lines changedLines changed: 18 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
135 | 135 |
| |
136 | 136 |
| |
137 | 137 |
| |
138 |
| - | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
139 | 141 |
| |
140 | 142 |
| |
141 | 143 |
| |
142 | 144 |
| |
143 |
| - | |
| 145 | + | |
144 | 146 |
| |
145 | 147 |
| |
146 | 148 |
| |
147 | 149 |
| |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
148 | 155 |
| |
149 | 156 |
| |
150 | 157 |
| |
| |||
178 | 185 |
| |
179 | 186 |
| |
180 | 187 |
| |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
181 | 195 |
| |
182 | 196 |
| |
183 | 197 |
| |
| |||
636 | 650 |
| |
637 | 651 |
| |
638 | 652 |
| |
639 |
| - | |
| 653 | + | |
| 654 | + | |
640 | 655 |
| |
641 | 656 |
| |
642 | 657 |
| |
|
Lines changed: 12 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
178 | 178 |
| |
179 | 179 |
| |
180 | 180 |
| |
181 |
| - | |
182 |
| - | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
183 | 193 |
| |
184 | 194 |
| |
185 | 195 |
| |
|
0 commit comments
Comments
(0)