Hi, Stefán!
Yes, there is a hard limit on HTTP URL length which is 16KB. As far as I can tell, JDBC driver sends the query text in the POST body, so that should not be a problem.
There are also relevant limits that you can change:
max_query_size (262144 bytes by default) - limit for the single statement length (possibly excluding INSERTed data)
max_ast_depth (1000 by default), max_ast_elements (50000 by default) - limits on query syntax tree complexity.