X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 9C844D1B248 for ; Mon, 2 Aug 2004 14:41:10 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 31666-06 for ; Mon, 2 Aug 2004 17:41:05 +0000 (GMT) Received: from school.digsys.bg (school.digsys.bg [193.68.6.1]) by svr1.postgresql.org (Postfix) with ESMTP id 26C28D1B241 for ; Mon, 2 Aug 2004 14:41:01 -0300 (ADT) Received: from faith.digsys.bg (root@www1.digsys.bg [193.68.6.128]) by school.digsys.bg (8.11.6/8.10.1) with ESMTP id i72Hf0E23000 for ; Mon, 2 Aug 2004 20:41:00 +0300 (EEST) Message-ID: <410E7BCB.9020604@faith.digsys.bg> Date: Mon, 02 Aug 2004 20:37:15 +0300 From: Kaloyan Iliev Iliev User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040115 X-Accept-Language: en-us, en, bg MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Problems with UNION ALL and ORDER BY Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200408/13 X-Sequence-Number: 18510 10x for the replies. We find the problem. It is in our scripts. We use to_char over a date field and then order by this field. So it sort it as text and not as date. I appologize for loosing your time. 10x again.