SET CONNECTION in PostgreSQL gives "unrecognized configuration parameter"
Converting question comments into an answer 

Abelisto:

It seems that you missed a section of the documentation: Chapter 34. ECPG - Embedded SQL in C. The PostgreSQL documentation is not ideal (but IMO it is much better then many others). Hint: to avoid inconveniences look at the page name in the address, for example plpgsql-declarations.html is about DECLARE variables in the plpgsql blocks and sql-declare.html is about DECLARE cursors in the pure SQL.

dezso: 

If using psql, you still can make use of \c - especially if it does not require typing a password.