Albretch Mueller wrote:
> adduser [...]
Why you create an operating system user is beyond me, but that
doesn't matter.
You start the database server as user "postgres", and you don't have
to be a specific OS user to use the client.
Maybe you are confusing database users and OS users.
However, that's not im****tant for the problem at hand.
> But then when I try my java code I get exactly the same error and
> this is what gets logged
> ~
> LOG: database system was shut down at 2008-05-06 23:51:37 EDT
> LOG: autovacuum launcher started
> LOG: database system is ready to accept connections
> LOG: connection received: host=3D[local]
> LOG: connection authorized: user=3Dpgtest database=3Dtestdb
> LOG: statement: select current_timestamp;
> LOG: statement: select * from testtbl;
> LOG: connection received: host=3D127.0.0.1 ****t=3D35036
> LOG: connection authorized: user=3Dpgtest database=3Dtestdb
> LOG: execute <unnamed>: SELECT
>
n.nspname,c.relname,a.attname,a.atttypid,a.attnotnull,a.atttypmod,a.attle=
n,a.attnum,def.adsrc,dsc.description,t.typbasetype, t.typtype
> FROM pg_catalog.pg_namespace n JOIN pg_catalog.pg_class c ON
> (c.relnamespace =3D n.oid) JOIN pg_catalog.pg_attribute a ON
> (a.attrelid=3Dc.oid) JOIN pg_catalog.pg_type t ON (a.atttypid =3D
t.oid)
> LEFT JOIN pg_catalog.pg_attrdef def ON (a.attrelid=3Ddef.adrelid AND
> a.attnum =3D def.adnum) LEFT JOIN pg_catalog.pg_description dsc ON
> (c.oid=3Ddsc.objoid AND a.attnum =3D dsc.objsubid) LEFT JOIN
> pg_catalog.pg_class dc ON (dc.oid=3Ddsc.classoid AND
> dc.relname=3D'pg_class') LEFT JOIN pg_catalog.pg_namespace dn ON
> (dc.relnamespace=3Ddn.oid AND dn.nspname=3D'pg_catalog') WHERE a.attnum
>
> 0 AND NOT a.attisdropped AND c.relname LIKE 'testtbl' ORDER BY
> nspname,relname,attnum
> LOG: disconnection: session time: 0:00:00.289 user=3Dpgtest
> database=3Dtestdb host=3D127.0.0.1 ****t=3D35036
I think the case is clear.
You close the database connection before you issue your statement!
Two things speak in favor of that:
- There is a disconnection message in your log.
- I can reproduce the error message by close()ing the connection before
execute()ing a statement.
That one statement that gets logged retrieves details about the table
definition of "testtbl".
Is it your JDBC code that issues that statement? If not, what is it?
Is there additional software involved?
Examine the code for a Connection.close() that takes place before the
Statement.execute().
Yours,
Laurenz Albe
--=20
Sent via pgsql-jdbc mailing list (pgsql-jdbc@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc


|