I have a code that looks like this:
con <- connect_to_my_postgres_database()
dbClearResult(dbExecute(con, "select function_that_returns_void()")
postgresqlCloseConnection(con)
This is yielding the error:
Condition: RPosgreSQL warning: unrecognized PostgreSQL field type void (id:2278) in column 0
NULL
Error in postgresqlCloseConnection(con) :
connection has pending rows (close open results set first)
Execution halted
How to fix this error?