forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit08691ea
committed
Rework some code handling pg_subscription data in psql and pg_dump
This commit fixes some inconsistencies found in the frontend code whendealing with subscription catalog data.The following changes are done:- pg_subscription.h gains a EXPOSE_TO_CLIENT_CODE, so as more contentdefined in pg_subscription.h becomes available in pg_subscription_d.hfor the frontend.- In psql's describe.c, substream can be switched to use CppAsString2()with its three LOGICALREP_STREAM_* values, with pg_subscription_d.hincluded.- pg_dump.c included pg_subscription.h, which is a header that shouldonly be used in the backend code. The code is updated to usepg_subscription_d.h instead.- pg_dump stored all the data from pg_subscription in SubscriptionInfowith only strings, and a good chunk of them are boolean and char values.Using strings is not necessary, complicates the code (see for exampletwo_phase_disabled[] removed here), and is inconsistent with the wayother catalogs' data is handled. The fields of SubscriptionInfo arereordered to match with the order in its catalog, while on it.Reviewed-by: Hayato KurodaDiscussion:https://postgr.es/m/Z0lB2kp0ksHgmVuk@paquier.xyz1 parent75818b3 commit08691ea
File tree
4 files changed
+58
-56
lines changed- src
- bin
- pg_dump
- psql
- include/catalog
4 files changed
+58
-56
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
4968 | 4968 | | |
4969 | 4969 | | |
4970 | 4970 | | |
| 4971 | + | |
4971 | 4972 | | |
4972 | 4973 | | |
4973 | 4974 | | |
4974 | 4975 | | |
4975 | 4976 | | |
4976 | 4977 | | |
| 4978 | + | |
4977 | 4979 | | |
4978 | 4980 | | |
4979 | 4981 | | |
4980 | 4982 | | |
4981 | 4983 | | |
4982 | 4984 | | |
4983 | | - | |
4984 | | - | |
4985 | 4985 | | |
4986 | 4986 | | |
4987 | 4987 | | |
| |||
4995 | 4995 | | |
4996 | 4996 | | |
4997 | 4997 | | |
| 4998 | + | |
| 4999 | + | |
4998 | 5000 | | |
4999 | | - | |
5000 | | - | |
5001 | | - | |
5002 | | - | |
5003 | | - | |
| 5001 | + | |
| 5002 | + | |
| 5003 | + | |
5004 | 5004 | | |
5005 | | - | |
| 5005 | + | |
5006 | 5006 | | |
5007 | | - | |
| 5007 | + | |
5008 | 5008 | | |
5009 | | - | |
| 5009 | + | |
| 5010 | + | |
| 5011 | + | |
5010 | 5012 | | |
5011 | 5013 | | |
5012 | 5014 | | |
| |||
5024 | 5026 | | |
5025 | 5027 | | |
5026 | 5028 | | |
5027 | | - | |
5028 | | - | |
5029 | | - | |
5030 | | - | |
5031 | 5029 | | |
5032 | 5030 | | |
5033 | 5031 | | |
| |||
5208 | 5206 | | |
5209 | 5207 | | |
5210 | 5208 | | |
5211 | | - | |
5212 | 5209 | | |
5213 | 5210 | | |
5214 | 5211 | | |
| |||
5245 | 5242 | | |
5246 | 5243 | | |
5247 | 5244 | | |
5248 | | - | |
| 5245 | + | |
5249 | 5246 | | |
5250 | 5247 | | |
5251 | | - | |
| 5248 | + | |
5252 | 5249 | | |
5253 | | - | |
| 5250 | + | |
5254 | 5251 | | |
5255 | 5252 | | |
5256 | 5253 | | |
5257 | 5254 | | |
5258 | | - | |
| 5255 | + | |
5259 | 5256 | | |
5260 | 5257 | | |
5261 | | - | |
| 5258 | + | |
5262 | 5259 | | |
5263 | 5260 | | |
5264 | | - | |
| 5261 | + | |
5265 | 5262 | | |
5266 | 5263 | | |
5267 | | - | |
| 5264 | + | |
5268 | 5265 | | |
5269 | 5266 | | |
5270 | | - | |
| 5267 | + | |
5271 | 5268 | | |
5272 | 5269 | | |
5273 | 5270 | | |
| |||
5303 | 5300 | | |
5304 | 5301 | | |
5305 | 5302 | | |
5306 | | - | |
| 5303 | + | |
5307 | 5304 | | |
5308 | 5305 | | |
5309 | 5306 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
664 | 664 | | |
665 | 665 | | |
666 | 666 | | |
667 | | - | |
668 | | - | |
669 | | - | |
670 | | - | |
671 | | - | |
672 | | - | |
673 | | - | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
674 | 675 | | |
675 | 676 | | |
676 | 677 | | |
677 | 678 | | |
678 | 679 | | |
679 | 680 | | |
680 | | - | |
681 | 681 | | |
682 | 682 | | |
683 | 683 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
6679 | 6680 | | |
6680 | 6681 | | |
6681 | 6682 | | |
6682 | | - | |
6683 | | - | |
6684 | | - | |
| 6683 | + | |
| 6684 | + | |
| 6685 | + | |
6685 | 6686 | | |
6686 | 6687 | | |
6687 | 6688 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | 26 | | |
47 | 27 | | |
48 | 28 | | |
| |||
159 | 139 | | |
160 | 140 | | |
161 | 141 | | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
162 | 164 | | |
163 | 165 | | |
164 | 166 | | |
| |||
174 | 176 | | |
175 | 177 | | |
176 | 178 | | |
| 179 | + | |
| 180 | + | |
177 | 181 | | |
178 | 182 | | |
179 | 183 | | |
| |||
0 commit comments
Comments
(0)