mirror of
https://github.com/postgres/postgres.git
synced 2025-07-31 22:04:40 +03:00
chomp PQerrorMessage() in backend uses
PQerrorMessage() returns an error message with a trailing newline, but in backend use (dblink, postgres_fdw, libpqwalreceiver), we want to have the error message without that for emitting via ereport(). To simplify that, add a function pchomp() that returns a pstrdup'ed string with the trailing newline characters removed.
This commit is contained in:
@ -377,7 +377,6 @@ FROM dblink('myconn','SELECT * FROM foo') AS t(a int, b text, c text[])
|
||||
WHERE t.a > 7;
|
||||
ERROR: could not establish connection
|
||||
DETAIL: missing "=" after "myconn" in connection info string
|
||||
|
||||
-- create a named persistent connection
|
||||
SELECT dblink_connect('myconn',connection_parameters());
|
||||
dblink_connect
|
||||
@ -604,7 +603,6 @@ FROM dblink('myconn','SELECT * FROM foo') AS t(a int, b text, c text[])
|
||||
WHERE t.a > 7;
|
||||
ERROR: could not establish connection
|
||||
DETAIL: missing "=" after "myconn" in connection info string
|
||||
|
||||
-- create a named persistent connection
|
||||
SELECT dblink_connect('myconn',connection_parameters());
|
||||
dblink_connect
|
||||
|
Reference in New Issue
Block a user