Re: dblink: could not send query: another command is already in progress

2018-04-03 Thread Laurenz Albe
Thiemo Kellner wrote: > > The other thing is that you seem to call "dblink_get_result" on any existing > > connection before use. But you can only call the function if there is a > > result outstanding. > > I call dblink_get_result only if I do not open a dblink connection, i. > e. only on secon

Re: dblink: could not send query: another command is already in progress

2018-04-03 Thread Thiemo Kellner
On 04/03/18 11:28, Laurenz Albe wrote: [...] 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 => bigi

Re: dblink: could not send query: another command is already in progress

2018-04-03 Thread Laurenz Albe
Thiemo Kellner wrote: > 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 t

Re: dblink: could not send query: another command is already in progress

2018-03-30 Thread Thiemo Kellner
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 Source

Re: dblink: could not send query: another command is already in progress

2018-03-30 Thread Laurenz Albe
Thiemo Kellner wrote: > The cause of the error message is clear; as the documentation says: > > >the query will fail soon. You must still complete the normal query > > protocol, > >for example by calling dblink_get_result. > > Ah, maybe this is the underlying problem. If dblink requires

Re: dblink: could not send query: another command is already in progress

2018-03-30 Thread Thiemo Kellner
On 03/30/18 07:39, Laurenz Albe wrote: psql:testing/test.pg_sql:41: NOTICE: Connection busy: 1 psql:testing/test.pg_sql:41: NOTICE: Last error: OK psql:testing/test.pg_sql:41: NOTICE: Cancel query: OK psql:testing/test.pg_sql:41: NOTICE: Connection busy: 0 psql:testing/test.pg_sql:41: NOT

Re: dblink: could not send query: another command is already in progress

2018-03-29 Thread Laurenz Albe
Thiemo Kellner wrote: > I try to use dblink to create a asynchronous logging facility. I have > the following code > > [...] > perform dblink_send_query( > V_DBLINK_CONNECTION_NAME, > V_QUERY > ); > raise notice '

dblink: could not send query: another command is already in progress

2018-03-29 Thread Thiemo Kellner
Hi all I try to use dblink to create a asynchronous logging facility. I have the following code -- open the dblink if it does not yet exist V_DBLINK_CONNECTION_NAME := GET_PROPERTY_VALUE_STRING( I_PROPERTY_NAME => 'DBLINK_CONNECTION_NAME'