X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 9B74DD1B897 for ; Fri, 5 Sep 2003 01:32:31 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 73805-05 for ; Thu, 4 Sep 2003 22:32:24 -0300 (ADT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 5FA94D1B8C6 for ; Thu, 4 Sep 2003 22:32:19 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h851WBjX019744; Thu, 4 Sep 2003 21:32:11 -0400 (EDT) To: Josh Goldberg Cc: pgsql-admin@postgresql.org Subject: Re: experimenting with coalesce, strange EXPLAIN results In-reply-to: <3F57C59C.9060600@4dmatrix.com> References: <3F57C59C.9060600@4dmatrix.com> Comments: In-reply-to Josh Goldberg message dated "Thu, 04 Sep 2003 16:07:08 -0700" Date: Thu, 04 Sep 2003 21:32:10 -0400 Message-ID: <19743.1062725530@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/88 X-Sequence-Number: 10176 Josh Goldberg writes: > I was experimenting with moving some of my case logic out of the > application and into sql and found a strange EXPLAIN result with one of > my COALESCE statements. Why is each subselect listed twice? This is in > 7.3.4 on freebsd 4.8. Prior to 7.4, COALESCE is just a parse-time macro for a CASE construct, and so the items do appear twice in the CASE. regards, tom lane