FW: Postgres 8.1 sequences and 'CALL'-syntax - Mailing list pgsql-general

From Schnabl, Sebastian
Subject FW: Postgres 8.1 sequences and 'CALL'-syntax
Date
Msg-id CE99C61B73E843438E690CBE9C63A5AF7323AC@srv02.dresden.local
Whole thread Raw
List pgsql-general
> Connection conn = ...
> CallableStatement cs = conn.prepareCall("{? = call
> nextval('seq_nm')}"); cs.registerOutParameter(1, Types.BIGINT);
> cs.execute(); long nextval = cs.getLong(1); cs.close();

Yeah, it seems to work, if i change the definition for calling the sequence in conjunction with sequoia trough jboss
changeinto: "{call nextvalue('seq_name')}"  [the "{}" pair is important !] and use the
"org.postgresql.jdbc3.Jdbc3PooledDataSource"driver class. 

Many Thx !



pgsql-general by date:

Previous
From: Kenneth Downs
Date:
Subject: Re: SQL Rule
Next
From: Geoffrey
Date:
Subject: Re: Mailing list setup issue