Commit 1f0a1fa
committed
ext/pgsql: route pg_copy_from table_name through build_tablename
The COPY query for pg_copy_from embedded the table_name argument with a
raw "%s", so a caller-supplied name like `t FROM STDIN --` redirected
the data into a different table than the API documents. Use the same
build_tablename helper that pg_insert/update/select/delete have used
since bug #62978. pg_copy_to is unchanged because COPY ... TO accepts
a parenthesised query as a source spec, which the existing test
06_bug73498 relies on.1 parent 8d0777e commit 1f0a1fa
2 files changed
Lines changed: 49 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
| 276 | + | |
| 277 | + | |
276 | 278 | | |
277 | 279 | | |
278 | 280 | | |
| |||
3464 | 3466 | | |
3465 | 3467 | | |
3466 | 3468 | | |
3467 | | - | |
3468 | 3469 | | |
3469 | 3470 | | |
3470 | 3471 | | |
| |||
3489 | 3490 | | |
3490 | 3491 | | |
3491 | 3492 | | |
3492 | | - | |
| 3493 | + | |
| 3494 | + | |
| 3495 | + | |
| 3496 | + | |
| 3497 | + | |
| 3498 | + | |
| 3499 | + | |
| 3500 | + | |
| 3501 | + | |
3493 | 3502 | | |
3494 | 3503 | | |
3495 | 3504 | | |
3496 | | - | |
| 3505 | + | |
3497 | 3506 | | |
3498 | | - | |
| 3507 | + | |
3499 | 3508 | | |
3500 | 3509 | | |
3501 | 3510 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
0 commit comments