Skip site navigation (1) Skip section navigation (2)

Re: Fw: Re: GROUP_CONCAT in PostgreSQL

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Markus Popp <m(dot)popp(at)db4free(dot)net>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Fw: Re: GROUP_CONCAT in PostgreSQL
Date: 2006-01-06 18:19:59
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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.


In response to

pgsql-jdbc by date

Next:From: Dave CramerDate: 2006-01-06 19:19:01
Subject: Re: Out Parameter Support
Previous:From: Kyle R Morse/EdenDate: 2006-01-06 14:55:50
Subject: Re: Out Parameter Support

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group