Fix for missing port in pg_foreign_server: default to standard 5432
This commit is contained in:
parent
7f9905cbd5
commit
064cc2a76b
@ -146,7 +146,7 @@ AS $$
|
||||
|
||||
plan = plpy.prepare("SELECT @extschema@.__CDB_FS_Foreign_Server_Port_PG($1) AS port", ['name'])
|
||||
rv = plpy.execute(plan, [server_internal], 1)
|
||||
port = rv[0]['port']
|
||||
port = rv[0]['port'] or 5432
|
||||
|
||||
n_errors = 0
|
||||
samples = []
|
||||
|
@ -1,4 +1,6 @@
|
||||
C1|
|
||||
C2|
|
||||
C3|
|
||||
%% It raises an error if the server does not exist
|
||||
ERROR: Server "doesNotExist" does not exist
|
||||
%% It returns a jsonb object
|
||||
@ -18,7 +20,9 @@ ERROR: Server "doesNotExist" does not exist
|
||||
%% Latency stats: stdev > 0
|
||||
2.3|t
|
||||
%% It raises an error if the wrong port is provided
|
||||
C2|
|
||||
ERROR: could not connect to server "cdb_fs_wrong-port"
|
||||
%% Latency stats: can get them on default PG port 5432 when not provided
|
||||
2.4|t|t
|
||||
D1|
|
||||
D2|
|
||||
D3|
|
||||
|
Loading…
Reference in New Issue
Block a user