- Notifications
You must be signed in to change notification settings - Fork5.2k
Commite376422
committed
pg_dump: Fix incorrect parsing of object types in pg_dump --filter.
Previously, pg_dump --filter could misinterpret invalid object typesin the filter file as valid ones. For example, the invalid object type"table-data" (likely a typo for the valid "table_data") could bemistakenly recognized as "table", causing pg_dump to succeedwhen it should have failed.This happened because pg_dump identified keywords as sequences ofASCII alphabetic characters, treating non-alphabetic characters(like hyphens) as keyword boundaries. As a result, "table-data" wasparsed as "table".To fix this, pg_dump --filter now treats keywords as strings ofnon-whitespace characters, ensuring invalid types like "table-data"are correctly rejected.Back-patch to v17, where the --filter option was introduced.Author: Fujii Masao <masao.fujii@gmail.com>Reviewed-by: Xuneng Zhou <xunengzhou@gmail.com>Reviewed-by: Srinath Reddy <srinath2133@gmail.com>Reviewed-by: Daniel Gustafsson <daniel@yesql.se>Discussion:https://postgr.es/m/CAHGQGwFzPKUwiV5C-NLBqz1oK1+z9K8cgrF+LcxFem-p3_Ftug@mail.gmail.comBackpatch-through: 171 parentce88170 commite376422
2 files changed
+18
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
175 | | - | |
176 | | - | |
| 174 | + | |
| 175 | + | |
177 | 176 | | |
178 | 177 | | |
179 | 178 | | |
| |||
182 | 181 | | |
183 | 182 | | |
184 | 183 | | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
185 | 187 | | |
186 | 188 | | |
187 | 189 | | |
188 | 190 | | |
189 | 191 | | |
190 | 192 | | |
191 | 193 | | |
192 | | - | |
| 194 | + | |
| 195 | + | |
193 | 196 | | |
194 | 197 | | |
195 | 198 | | |
196 | | - | |
| 199 | + | |
197 | 200 | | |
198 | 201 | | |
199 | 202 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
418 | 418 | | |
419 | 419 | | |
420 | 420 | | |
421 | | - | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
422 | 428 | | |
423 | 429 | | |
424 | | - | |
| 430 | + | |
425 | 431 | | |
426 | 432 | | |
427 | 433 | | |
| |||
432 | 438 | | |
433 | 439 | | |
434 | 440 | | |
435 | | - | |
436 | | - | |
| 441 | + | |
| 442 | + | |
437 | 443 | | |
438 | 444 | | |
439 | 445 | | |
| |||
0 commit comments
Comments
(0)