db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Eade <se...@backstagetech.com.au>
Subject Re: [DB Torque Wiki] Updated: PostgreSQLFAQ
Date Thu, 22 Apr 2004 02:13:54 GMT
Shevek wrote:

>On Thu, 22 Apr 2004 torque-dev@db.apache.org wrote:
>>+== When I examine the source code I see that the PostgreSQL currval()
>>function is used for idMethod='native' - this cannot possibly be right
>>since it should quite obviously be using nextval(). == + +Please read
>>the following thread in its entirety: + *
>>+The source also gives the impression that it is somehow using
>>AUTOINCREMENT when SEQUENCE would seem to be the more obvious choice.  
>>This is more of an indication of whether or not the id should be
>>returned before or after the insert - the names of these things could
>>certainly be improved. +
>> == Do I need to patch the PostgreSQL driver to work with Torque? ==
>Thankyou. I see that this problem has been encountered before. 
>So now if I don't set the id-method-parameter seqName, then postgres fails
>because it's trying to select currval from a sequence which noone has
>selected nextval from.
>And if I do set the id-method-parameter seqName, then postgres fails
>because it tries to create tables with a primary key sequence that Torque
>already created.
>It looks rather like Hobson's choice, and it's documented as such at 
Look at the message you quoted from - it was an update to 
http://wiki.apache.org/db-torque/PostgreSQLFAQ rather than the obsolete 
page you reference here (I have just updated all of the old wiki pages 
to point to the new wiki).

>Are you, by any chance, using a really old [and obsolete] version of
7.3.4 - not cutting edge, but by no means old.  If you go to the page I 
reference above and read the FAQ you will save yourself a bunch of time.

>I won't say "You were right" because out of the box, it doesn't work, and
>can't be made to work without hacking the generated code. However, I will
>happily admit that it wasn't the bug I first thought it was.
I am not looking for you to acknowledge that I am right, just attempting 
to jump to the conclusion (that it works) without covering the same old 
stuff.  Yes, there are a few small issues with PostgreSQL support in 
Torque.  I am reasonably comfortable that most of the issues are 
documented on the FAQ page and that none of these are show stoppers.


Scott Eade
Backstage Technologies Pty. Ltd.

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

View raw message