forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commita578257
committed
Accept a non-existent value in "ALTER USER/DATABASE SET ..." command.
When default_text_search_config, default_tablespace, or temp_tablespacessetting is set per-user or per-database, with an "ALTER USER/DATABASE SET..." statement, don't throw an error if the text search configuration ortablespace does not exist. In case of text search configuration, even ifit doesn't exist in the current database, it might exist in anotherdatabase, where the setting is intended to have its effect. This behavioris now the same as search_path's.Tablespaces are cluster-wide, so the same argument doesn't hold fortablespaces, but there's a problem with pg_dumpall: it dumps "ALTER USERSET ..." statements before the "CREATE TABLESPACE" statements. Arguablythat's pg_dumpall's fault - it should dump the statements in such an orderthat the tablespace is created first and then the "ALTER USER SETdefault_tablespace ..." statements after that - but it seems better to beconsistent with search_path and default_text_search_config anyway. Besides,you could still create a dump that throws an error, by creating thetablespace, running "ALTER USER SET default_tablespace", then dropping thetablespace and running pg_dumpall on that.Backpatch to all supported versions.1 parentad10853 commita578257
2 files changed
+55
-7
lines changedLines changed: 37 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1031 | 1031 |
| |
1032 | 1032 |
| |
1033 | 1033 |
| |
1034 |
| - | |
1035 |
| - | |
1036 |
| - | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
1037 | 1055 |
| |
1038 | 1056 |
| |
1039 | 1057 |
| |
| |||
1148 | 1166 |
| |
1149 | 1167 |
| |
1150 | 1168 |
| |
1151 |
| - | |
1152 |
| - | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
1153 | 1177 |
| |
1154 |
| - | |
| 1178 | + | |
1155 | 1179 |
| |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
1156 | 1186 |
| |
| 1187 | + | |
1157 | 1188 |
| |
1158 | 1189 |
| |
1159 | 1190 |
| |
|
Lines changed: 18 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
601 | 601 |
| |
602 | 602 |
| |
603 | 603 |
| |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
604 | 611 |
| |
605 |
| - | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
606 | 623 |
| |
607 | 624 |
| |
608 | 625 |
| |
|
0 commit comments
Comments
(0)