X-Original-To: pgsql-patches-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 8AD1F5E46C4 for ; Sat, 28 Aug 2004 19:41:34 -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 91088-05 for ; Sat, 28 Aug 2004 22:41:26 +0000 (GMT) Received: from joeconway.com (66-146-172-86.skyriver.net [66.146.172.86]) by svr1.postgresql.org (Postfix) with ESMTP id 9447D5E46C3 for ; Sat, 28 Aug 2004 19:41:24 -0300 (ADT) Received: from [192.168.4.3] (account jconway [192.168.4.3] verified) by joeconway.com (CommuniGate Pro SMTP 4.1.8) with ESMTP-TLS id 2150842; Sat, 28 Aug 2004 15:33:31 -0700 Message-ID: <41310A17.5020405@joeconway.com> Date: Sat, 28 Aug 2004 15:41:27 -0700 From: Joe Conway User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040803 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Markus Bertheau Cc: Tom Lane , "Patches (PostgreSQL)" Subject: Re: [SQL] array_in: '{}}'::text[] References: <1093261555.2647.6.camel@dicaprio.akademie1.de> <412A384C.5000907@joeconway.com> <412F9BA5.8070009@joeconway.com> <14978.1093662341@sss.pgh.pa.us> <4130DE0F.7030207@joeconway.com> <1093723759.2732.16.camel@teetnang> In-Reply-To: <1093723759.2732.16.camel@teetnang> 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/527 X-Sequence-Number: 12816 Markus Bertheau wrote: > > Without looking at the code in a whole, you accept '{} ' as an empty > array literal, so why is the special case for '{}' needed here? It's a fast path for a common special case. Why spend any cycles parsing if we can immediately recognize it? However, anything other than a simple '{}' does require parsing. Joe