On 03/30/18 11:14, Laurenz Albe wrote:
You have to consume the result before you can send the next query.
I changed implementation but still get the same error but now different
context. I tried to retrieve the result but I failed
I committed the last code to its project repository at SourceForge
https://sourceforge.net/p/pglogger/code/HEAD/tree/
and put the code to pastebin.com
Test calls: https://pastebin.com/xfUp9NAL
function WRITE_MESSAGE: https://pastebin.com/LDjE0Czx
function WRITE_MESSAGE_TO_TABLE: https://pastebin.com/vkBkehZF
Output
psql:testing/test.pg_sql:41: NOTICE: 2018-03-30 18:41:18.245592
- Calling function:
- Current user: act
- Session user: act
- Transaction timestamp: 2018-03-30 18:41:18.240580
- Transaction ID:
- Server process ID: 22401
- Address of the remote connection:
- Port of the remote connection:
- Message: Test WRITE_MESSAGE
write_message
---------------
(1 row)
psql:testing/test.pg_sql:42: NOTICE: 2018-03-30 18:41:18.257750
- Calling function:
- Current user: act
- Session user: act
- Transaction timestamp: 2018-03-30 18:41:18.240580
- Transaction ID:
- Server process ID: 22401
- Address of the remote connection:
- Port of the remote connection:
- Message: Test WRITE_MESSAGE 2nd call
psql:testing/test.pg_sql:42: ERROR: function
WRITE_MESSAGE_TO_TABLE(i_function => text, i_message => text, i_level =>
text, i_present_user => name, i_session_user => name,
i_transaction_timestamp => timestamp with time zone, i_transaction_id =>
bigint, i_server_pid => bigint, i_remote_address => inet, i_remote_port
=> integer) does not exist
HINT: No function matches the given name and argument types. You might
need to add explicit type casts.
CONTEXT: Error occurred on dblink connection named
"PGLOGGER_CONNECTION": could not execute query.
SQL statement "SELECT * from
dblink_get_result(V_DBLINK_CONNECTION_NAME) as t(ID bigint)"
PL/pgSQL function write_message(text,text) line 126 at PERFORM
psql:testing/test.pg_sql:42: STATEMENT: select WRITE_MESSAGE('Test
WRITE_MESSAGE 2nd call', 'NOTICE');
--
SIP/iptel.org: thiemo.kellner
Öffentlicher PGP-Schlüssel:
http://pgp.mit.edu/pks/lookup?op=get&search=0xCA167FB0E717AFFC
begin:vcard
fn:Thiemo Kellner
n:Kellner;Thiemo
adr:;;Landstr. 34;Weilheim-Bannholz;BW;79809;Deutschland
email;internet:thiemo@xxxxxxxxxxxxxxxxxxxx
tel;work:+49 1578 772 37 37
tel;cell:+41 78 947 36 21
note;quoted-printable:Auf Gelassene Pferde kann man bauen!=0D=0A=
+49 (0)1578-772 37 37 (Mo, Di)=0D=0A=
+41 (0)78 947 36 21 (Mi - Fr)=0D=0A=
sip: thiemo.kellner@xxxxxxxxx=0D=0A=
Skype: thiemo.kellner=0D=0A=
http://www.gelassene-pferde.biz=0D=0A=
Mitglied bei http://www.keep-it-natural.org=0D=0A=
=C3=96ffentlicher PGP-Schl=C3=BCssel: http://pgp.mit.edu/pks/lookup?op=3D=
get&search=3D0x8F70EFD2D972CBEF
x-mozilla-html:FALSE
url:http://www.gelassene-pferde.biz
version:2.1
end:vcard