- Notifications
You must be signed in to change notification settings - Fork5
Commit3a13f12
committed
Behave correctly if INSERT ... VALUES is decorated with additional clauses.
In versions 8.2 and up, the grammar allows attaching ORDER BY, LIMIT,FOR UPDATE, or WITH to VALUES, and hence to INSERT ... VALUES. But thespecial-case code for VALUES in transformInsertStmt() wasn't expecting anyof those, and just ignored them, leading to unexpected results. Ratherthan complicate the special-case path, just ensure that the presence of anyof those clauses makes us treat the query as if it had a general SELECT.Per report from Hitoshi Harada.1 parente77f605 commit3a13f12
1 file changed
+10
-1
lines changedLines changed: 10 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
347 | 347 |
| |
348 | 348 |
| |
349 | 349 |
| |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
350 | 354 |
| |
351 |
| - | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
352 | 361 |
| |
353 | 362 |
| |
354 | 363 |
| |
|
0 commit comments
Comments
(0)