Re: Fw: Re: GROUP_CONCAT in PostgreSQL - Mailing list pgsql-jdbc

From Oliver Jowett
Subject Re: Fw: Re: GROUP_CONCAT in PostgreSQL
Date
Msg-id 43BEB4CF.1070907@opencloud.com
Whole thread Raw
In response to Fw: Re: GROUP_CONCAT in PostgreSQL  ("Markus Popp" <m.popp@db4free.net>)
List pgsql-jdbc
Markus Popp wrote:

> FE=> Terminate

> FE=> Parse(stmt=null,query="SELECT a.constraint_name, a.table_name,
> a.constraint_type, array_to_string( array( SELECT column_name::varchar FROM
> information_schema.key_column_usage WHERE constraint_name =
> a.constraint_name ORDER BY ordinal_position ), '_' ) as column_list,
> c.table_name, c.column_name FROM information_schema.table_constraints a
> INNER JOIN information_schema.key_column_usage b ON a.constraint_name =
> b.constraint_name LEFT JOIN information_schema.constraint_column_usage c ON
> a.constraint_name = c.constraint_name AND a.constraint_type = 'FOREIGN KEY'
> GROUP BY a.constraint_name, a.table_name, a.constraint_type, c.table_name,
> c.column_name ORDER BY a.table_name, a.constraint_name",oids={})

Ok, at a glance it looks like something is closing the connection before
you manage to actually execute the query, and the I/O error occurs
because the server is shutting down the connection in response to that
Terminate message when the real query arrives.

Can you check that your code does not call Connection.close() before the
query is run? I notice from your stacktrace that you are running queries
from an AWT event-dispatch thread, is it possible that there is another
thread that is using the Connection concurrently?

If that's not the problem, can you send me a selfcontained testcase that
shows the problem?

If you *are* calling Connection.close(), I'd be interested in exactly
what the timing is, since in theory the driver should realise the
connection is dead and tell you so rather than giving an obscure I/O error.

-O

pgsql-jdbc by date:

Previous
From: Kyle R Morse/Eden
Date:
Subject: Re: Out Parameter Support
Next
From: Dave Cramer
Date:
Subject: Re: Out Parameter Support