forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commite4c1a49
committed
Don't #include utils/palloc.h in common/fe_memutils.h.
This breaks the principle that common/ ought not depend on anything in theserver, not only code-wise but in the headers. The only arguable advantageis avoidance of duplication of half a dozen extern declarations, and eventhat is rather dubious, considering that the previous coding was wrongabout which declarations to duplicate: it exposed pnstrdup() to frontendcode even though no such function is provided in fe_memutils.c.On the same principle, don't #include utils/memutils.h in the frontendbuild of psprintf.c. This requires duplicating the definition ofMaxAllocSize, but that seems fine to me: there's no a-priori reason whyfrontend code should use the same size limit as the backend anyway.In passing, clean up some rather odd layout and ordering choices thatwere imposed on palloc.h to reduce the number of #ifdefs required bythe previous approach.Per gripe from Christoph Berg. There's still more work to do to makeinclude/common/ clean, but this part seems reasonably noncontroversial.1 parentc0bd128 commite4c1a49
2 files changed
+14
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
19 | 25 | | |
20 | 26 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
40 | 38 | | |
41 | 39 | | |
42 | | - | |
43 | | - | |
| 40 | + | |
| 41 | + | |
44 | 42 | | |
45 | 43 | | |
46 | 44 | | |
| |||
51 | 49 | | |
52 | 50 | | |
53 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
54 | 57 | | |
55 | 58 | | |
56 | 59 | | |
| |||
89 | 92 | | |
90 | 93 | | |
91 | 94 | | |
92 | | - | |
93 | 95 | | |
94 | 96 | | |
95 | 97 | | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | 98 | | |
101 | 99 | | |
0 commit comments
Comments
(0)