Return-Path: Delivered-To: apmail-db-torque-dev-archive@www.apache.org Received: (qmail 96551 invoked from network); 22 Apr 2004 02:14:16 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 22 Apr 2004 02:14:16 -0000 Received: (qmail 57906 invoked by uid 500); 22 Apr 2004 02:13:57 -0000 Delivered-To: apmail-db-torque-dev-archive@db.apache.org Received: (qmail 57891 invoked by uid 500); 22 Apr 2004 02:13:57 -0000 Mailing-List: contact torque-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Apache Torque Developers List" Reply-To: "Apache Torque Developers List" Delivered-To: mailing list torque-dev@db.apache.org Received: (qmail 57877 invoked from network); 22 Apr 2004 02:13:56 -0000 Received: from unknown (HELO mail.iinet.net.au) (203.59.3.42) by daedalus.apache.org with SMTP; 22 Apr 2004 02:13:56 -0000 Received: (qmail 17324 invoked from network); 22 Apr 2004 02:14:03 -0000 Received: from unknown (HELO turnip) (203.217.17.173) by mail.iinet.net.au with SMTP; 22 Apr 2004 02:14:03 -0000 Message-ID: <40872A62.6000403@backstagetech.com.au> Date: Thu, 22 Apr 2004 12:13:54 +1000 From: Scott Eade User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Apache Torque Developers List Subject: Re: [DB Torque Wiki] Updated: PostgreSQLFAQ References: <20040422005103.53779.13788@minotaur.apache.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 0416-4, 04/18/2004), Outbound message X-Antivirus-Status: Clean X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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: + * >>http://nagoya.apache.org/eyebrowse/ReadMsg?listName=torque-dev@db.apache.org&msgNo=3537 >>+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 >http://nagoya.apache.org/wiki/apachewiki.cgi?TorqueProjectPages/PostgreSQLFAQ > > 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 >postgres? > > 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 -- Scott Eade Backstage Technologies Pty. Ltd. http://www.backstagetech.com.au --------------------------------------------------------------------- To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org For additional commands, e-mail: torque-dev-help@db.apache.org