Skip to content

Commit fcfec1f

Browse files
committed
fix: hardcoding the shared lib name
Use `module_pathname` to fix this.
1 parent eb67b4a commit fcfec1f

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ $(BUILD_DIR)/$(EXTENSION).$(SHARED_EXT): $(EXTENSION).$(SHARED_EXT)
7070
sql/$(EXTENSION)--$(EXTVERSION).sql: sql/$(EXTENSION).sql
7171
cp $< $@
7272

73-
$(EXTENSION).control:
73+
$(EXTENSION).control: $(EXTENSION).control.in
7474
sed "s/@EXTVERSION@/$(EXTVERSION)/g" $(EXTENSION).control.in > $@
7575

7676
PGXS := $(shell $(PG_CONFIG) --pgxs)

pg_net.control.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
comment = 'Async HTTP'
22
default_version = '@EXTVERSION@'
33
relocatable = false
4+
module_pathname = '$libdir/pg_net'

sql/pg_net.sql

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,31 +80,31 @@ create or replace function net._urlencode_string(string varchar)
8080
returns text
8181
language 'c'
8282
immutable
83-
as 'pg_net';
83+
as 'MODULE_PATHNAME';
8484

8585
-- API: Private
8686
create or replace function net._encode_url_with_params_array(url text, params_array text[])
8787
-- url encoded string
8888
returns text
8989
language 'c'
9090
immutable
91-
as 'pg_net';
91+
as 'MODULE_PATHNAME';
9292

9393
create or replace function net.worker_restart()
9494
returns bool
9595
language 'c'
96-
as 'pg_net';
96+
as 'MODULE_PATHNAME';
9797

9898
create or replace function net.wait_until_running()
9999
returns void
100100
language 'c'
101-
as 'pg_net';
101+
as 'MODULE_PATHNAME';
102102
comment on function net.wait_until_running() is 'waits until the worker is running';
103103

104104
create or replace function net.wake()
105105
returns void
106106
language 'c'
107-
as 'pg_net';
107+
as 'MODULE_PATHNAME';
108108

109109
-- Interface to make an async request
110110
-- API: Public

0 commit comments

Comments
 (0)