- Notifications
You must be signed in to change notification settings - Fork5
Commitfb6fcbd
committed
Use LOAD not actual code execution to pull in plpython library.
Commit866566a is insufficient to prevent dump/reload failureswhen using transform modules in a database with both plpython2 andplpython3 installed. The reason is that the transform extension scriptsuse DO blocks as a mechanism to pull in the libpython library beforecreating the transform function. It's necessary to preload the librarybecause the dynamic loader won't do it for us on every platform, leadingto "unresolved symbol" failures when the transform library is loaded.But it's *not* necessary to execute Python code, and doing so willprovoke a multiple-Pythons-are-loaded error even after the precedingcommit.To fix, use LOAD instead of a DO block. That requires superuser privilege,but creation of a C function does anyway. It also embeds knowledge ofthe underlying library name for each PL language; but that's wired intothe initdb-time contents of pg_pltemplate too, so that doesn't seem likea large problem either. Note that CREATE TRANSFORM as such doesn't callthe language module at all.Per a report from Paul Jones. Back-patch to 9.5 where transform moduleswere introduced.1 parent866566a commitfb6fcbd
File tree
8 files changed
+8
-8
lines changed- contrib
- hstore_plperl
- hstore_plpython
- ltree_plpython
8 files changed
+8
-8
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 |
| - | |
| 2 | + | |
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 |
| - | |
| 2 | + | |
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 |
| - | |
| 2 | + | |
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 |
| - | |
| 2 | + | |
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 |
| - | |
| 2 | + | |
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 |
| - | |
| 2 | + | |
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 |
| - | |
| 2 | + | |
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 |
| - | |
| 2 | + | |
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
|
0 commit comments
Comments
(0)