db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Fischer <tfisc...@apache.org>
Subject postgresql and sequences
Date Sun, 27 Mar 2005 07:43:19 GMT
Hi,

i have just noted that in current cvs HEAD, the postgresql idMethod 
"native" does not work(i.e. the runtimetest fails miserably). This is due 
to the default id method being SEQUENCE, and the sequences are not 
generated. Digging in cvs history, I have found that Scott has removed 
explicit creation of sequences at some point, and later Henning has added 
them again in the Torque 3.1 Branch.

When Scott removed the explicit creation of sequences, 
the sequence value was obtained by a DEFAULT NEXTVAL('sequence_name') 
appended to the column definition when creating a table, whereas now, the 
sequence value is obtained by a SELECT NEXTVAL('sequence_name') before the 
insert. I would guess that in the first case, Postgresql might 
automatically create sequences, whereas in the second case, it doesn't.

A strange thing is that I did not find a sequence.vm in the attic of the 
postgresql template directory in CVS (there is not even an attic, 
according to viewcvs).

So to get the runtimetest running for postgresql native, I will add the 
explicit creation of sequences again to the postgresql templates, and I 
will also add a sequence.vm. If anybody does think that this is not the 
optimal solution, please let me know.

     Thomas

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


Mime
View raw message