Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id C25336326AC for ; Thu, 10 Dec 2009 13:50:34 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 96143-07 for ; Thu, 10 Dec 2009 17:50:22 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mail.postgresql.org (Postfix) with ESMTP id 84DF1632419 for ; Thu, 10 Dec 2009 13:50:23 -0400 (AST) Received: from list by lo.gmane.org with local (Exim 4.50) id 1NIn9f-00005b-Pg for pgsql-sql@postgresql.org; Thu, 10 Dec 2009 18:50:19 +0100 Received: from srv.protecting.net ([212.126.218.242]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 10 Dec 2009 18:50:19 +0100 Received: from hari.fuchs by srv.protecting.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 10 Dec 2009 18:50:19 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-sql@postgresql.org From: Harald Fuchs Subject: Re: Window function trouble Date: Thu, 10 Dec 2009 18:49:57 +0100 Lines: 10 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: srv.protecting.net X-Archive: encrypt User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) Cancel-Lock: sha1:bzOFznazKwBusYKjJTPOHoAI/Lw= X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=AWL=0.000, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200912/28 X-Sequence-Number: 33466 In article , Harald Fuchs writes: > The other users for one address are gone. Does anyone know why? Update: they are not gone, but they've moved to the end of the result set. Apparently the CASE expression is named "adr" unless named otherwise, and the result set is sorted by this expression instead of the column named "adr". Does anyone know what the SQL standard says about that?