Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 3EE079FB21F for ; Mon, 2 Oct 2006 13:59:13 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 27450-01 for ; Mon, 2 Oct 2006 16:59:05 +0000 (UTC) X-Greylist: delayed 20:26:16.954887 by SQLgrey- Received: from aranzo.netg.se (aranzo.netg.se [212.91.141.40]) by postgresql.org (Postfix) with ESMTP id 4D5AC9FB220 for ; Mon, 2 Oct 2006 13:59:04 -0300 (ADT) Received: from arsi (helo=localhost) by aranzo.netg.se with local-esmtp (Exim 4.50) id 1GUR6R-0007UP-KN for pgsql-general@postgresql.org; Mon, 02 Oct 2006 18:57:15 +0200 Date: Mon, 2 Oct 2006 18:57:15 +0200 (CEST) From: arsi@aranzo.netg.se To: pgsql-general@postgresql.org Subject: Re: String handling function, substring vs. substr In-Reply-To: <4834.1159742510@sss.pgh.pa.us> Message-ID: References: <6992E470F12A444BB787B5C937B9D4DF060E5C9B@ca-mail1.cis.local> <45202965.3000000@zijn-digital.com> <4834.1159742510@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.961 tagged_above=0 required=5 tests=NO_REAL_NAME X-Spam-Level: X-Archive-Number: 200610/57 X-Sequence-Number: 101584 Hi all, > brian writes: >> arsi@aranzo.netg.se wrote: >>> Does this mean that substr calls substring internally?? Or is it the >>> other way around?? Or are they independent of each other?? > >> Looks like they're pretty evenly matched. > > Actually, a bit of poking into the contents of pg_proc will show you > that they are both aliases for the same C function (text_substr_no_len). > So they should be *exactly* the same speed. > > regards, tom lane > Thanks Brian for your answer (although that wasn't what I was looking for, I was looking for Tom's answer). Thanks Tom for your answer. Archie