db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Eade <se...@backstagetech.com.au>
Subject Re: postgres sequence definition
Date Tue, 24 Feb 2004 12:47:50 GMT
E.Nebrat wrote:

> could somebody help with defining postgres sequence using 
> id-method-parameter? Is it possible? I'd like to use "native" 
> id-method and to setup sequence initial value. Can I do this with 
> id-method-parameter?

Assuming the sequence already exists, but you have loaded data into the 
table manually you would set the initial value in PostgreSQL itself 
using something like:
    SELECT setval('tableName_columnName_seq', max(columnName)) FROM 

Your schema needs to include definition of the correct sequence names as 
the last child element in the table element thus:
    <id-method-parameter name="seqName" value="tableName_columnName_seq"/>

For further details see:


Scott Eade
Backstage Technologies Pty. Ltd.

To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org

View raw message