X-Original-To: pgsql-sql@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 989AC475A80 for ; Tue, 15 Apr 2003 06:48:03 -0400 (EDT) Received: from fish.net (codepoets.co.uk [81.5.147.148]) by postgresql.org (Postfix) with ESMTP id BD6A5474E44 for ; Tue, 15 Apr 2003 06:47:54 -0400 (EDT) Received: by fish.net (Postfix, from userid 612) id 1F92D1E07; Tue, 15 Apr 2003 11:47:52 +0100 (BST) Received: from haddock.fish.net (haddock.fish.net [192.168.0.2]) by fish.net (Postfix) with ESMTP id 6F3CC1B2E; Tue, 15 Apr 2003 11:47:50 +0100 (BST) Received: by haddock.fish.net (Postfix, from userid 1000) id 5C752ECAD; Tue, 15 Apr 2003 11:47:50 +0100 (BST) Date: Tue, 15 Apr 2003 11:47:50 +0100 From: David Goodwin To: DIB Walid Cc: pgsql-sql@postgresql.org Subject: Re: ordering problems ... Message-ID: <20030415104749.GA3191@codepoets.co.uk> References: <20030415103328.GA3076@codepoets.co.uk> <200304151042.h3FAgqO20812@imap-serv.inrialpes.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200304151042.h3FAgqO20812@imap-serv.inrialpes.fr> User-Agent: Mutt/1.4.1i X-Operating-System: Slackware Linux 8.1 + - 2.4.20-ck6 X-Spam-Status: No, hits=-29.4 required=5.0 tests=BAYES_20,IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES, REPLY_WITH_QUOTES,SIGNATURE_SHORT_SPARSE,USER_AGENT_MUTT autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/224 X-Sequence-Number: 12925 DIB Walid wrote : > Hello, > I think that Postgres use the default ORDER BY function: > so in your first request there is a default order by on the "answer" > In order to obtain the same order in your second request, put"ORDER BY > ANSWER" in your request, because if you miss this point, postgres will order > by id automatically, i hope i understand your problem because my english is a > little weak. > @+ > Walid > INRIA Rhones Alpes Hi, Thanks for the speedy reply :) I just discovered that if i put in a "order by qra.oid" it works ok. If I run the query with "select * from ..." rather than "select answer from .." the results are the same (ordered alphabetically by answer). thanks David. -- David Goodwin [ dof at codepoets dot co dot uk ] [ http://www.codepoets.co.uk ]