forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd51924b
committed
Convert contrib/hstore_plpython to not use direct linking to other modules.
Previously, on most platforms, we allowed hstore_plpython's referencesto hstore and plpython to be unresolved symbols at link time, trustingthe dynamic linker to resolve them when the module is loaded. Thishas a number of problems, the worst being that the dynamic linkerdoes not know where the references come from and can do nothing butfail if those other modules haven't been loaded. We've more or lessgotten away with that for the limited use-case of datatype transformmodules, but even there, it requires some awkward hacks, most recentlycommit83c2492.Instead, let's not treat these references as linker-resolvable at all,but use function pointers that are manually filled in by the module's_PG_init function. There are few enough contact points that thisdoesn't seem unmaintainable, at least for these use-cases. (Note thatthe same technique wouldn't work at all for decoupling from libpythonitself, but fortunately that's just a standard shared library and canbe linked to normally.)This is an initial patch that just converts hstore_plpython. If thebuildfarm doesn't find any fatal problems, I'll work on the othertransform modules soon.Tom Lane, per an idea of Andres Freund's.Discussion: <2652.1475512158@sss.pgh.pa.us>1 parent6bc811c commitd51924b
File tree
6 files changed
+76
-26
lines changed- contrib/hstore_plpython
- src/tools/msvc
6 files changed
+76
-26
lines changedLines changed: 9 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4 | 4 |
| |
5 | 5 |
| |
6 | 6 |
| |
7 |
| - | |
| 7 | + | |
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
| |||
23 | 23 |
| |
24 | 24 |
| |
25 | 25 |
| |
26 |
| - | |
27 |
| - | |
| 26 | + | |
28 | 27 |
| |
29 | 28 |
| |
30 |
| - | |
31 |
| - | |
| 29 | + | |
| 30 | + | |
32 | 31 |
| |
33 |
| - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
34 | 37 |
| |
35 |
| - | |
36 |
| - | |
37 |
| - | |
38 |
| - | |
39 | 38 |
| |
40 | 39 |
| |
41 | 40 |
| |
|
Lines changed: 65 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
| 2 | + | |
2 | 3 |
| |
3 | 4 |
| |
4 | 5 |
| |
5 | 6 |
| |
6 | 7 |
| |
7 | 8 |
| |
8 | 9 |
| |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
9 | 74 |
| |
10 | 75 |
| |
11 | 76 |
| |
|
Lines changed: 0 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
6 |
| - | |
7 |
| - | |
8 |
| - | |
9 |
| - | |
10 |
| - | |
11 | 6 |
| |
12 | 7 |
| |
13 | 8 |
| |
|
Lines changed: 0 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
6 |
| - | |
7 |
| - | |
8 |
| - | |
9 |
| - | |
10 |
| - | |
11 | 6 |
| |
12 | 7 |
| |
13 | 8 |
| |
|
Lines changed: 0 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
6 |
| - | |
7 |
| - | |
8 |
| - | |
9 |
| - | |
10 |
| - | |
11 | 6 |
| |
12 | 7 |
| |
13 | 8 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
475 | 475 |
| |
476 | 476 |
| |
477 | 477 |
| |
478 |
| - | |
| 478 | + | |
479 | 479 |
| |
480 | 480 |
| |
481 | 481 |
| |
| 482 | + | |
482 | 483 |
| |
483 | 484 |
| |
484 | 485 |
| |
|
0 commit comments
Comments
(0)