forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit0461b66
committed
Fix pg_dump to not emit invalid SQL for an empty operator class.
If an operator class has no operators or functions, and doesn't needa STORAGE clause, we emitted "CREATE OPERATOR CLASS ... AS ;" whichis syntactically invalid. Fix by forcing a STORAGE clause to beemitted anyway in this case.(At some point we might consider changing the grammar to allow CREATEOPERATOR CLASS without an opclass_item_list. But probably we'd want toomit the AS in that case, so that wouldn't fix this pg_dump issue anyway.)It's been like this all along, so back-patch to all supported branches.Daniel Gustafsson, tweaked by me to avoid a dangling-pointer bugDiscussion:https://postgr.es/m/D9E5FC64-7A37-4F3D-B946-7E4FB468F88A@yesql.se1 parent9c34a05 commit0461b66
1 file changed
+13
-1
lines changedLines changed: 13 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
12440 | 12440 |
| |
12441 | 12441 |
| |
12442 | 12442 |
| |
12443 |
| - | |
| 12443 | + | |
| 12444 | + | |
12444 | 12445 |
| |
12445 | 12446 |
| |
12446 | 12447 |
| |
| |||
12674 | 12675 |
| |
12675 | 12676 |
| |
12676 | 12677 |
| |
| 12678 | + | |
| 12679 | + | |
| 12680 | + | |
| 12681 | + | |
| 12682 | + | |
| 12683 | + | |
| 12684 | + | |
| 12685 | + | |
| 12686 | + | |
12677 | 12687 |
| |
12678 | 12688 |
| |
12679 | 12689 |
| |
| |||
12701 | 12711 |
| |
12702 | 12712 |
| |
12703 | 12713 |
| |
| 12714 | + | |
| 12715 | + | |
12704 | 12716 |
| |
12705 | 12717 |
| |
12706 | 12718 |
| |
|
0 commit comments
Comments
(0)