Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 2B6D79FB3AF for ; Sun, 1 Oct 2006 19:41:55 -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 89399-04 for ; Sun, 1 Oct 2006 22:41:51 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 926F29FA2C7 for ; Sun, 1 Oct 2006 19:41:51 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k91Mfoc6004835; Sun, 1 Oct 2006 18:41:50 -0400 (EDT) To: brian cc: pgsql-general@postgresql.org Subject: Re: String handling function, substring vs. substr In-reply-to: <45202965.3000000@zijn-digital.com> References: <6992E470F12A444BB787B5C937B9D4DF060E5C9B@ca-mail1.cis.local> <45202965.3000000@zijn-digital.com> Comments: In-reply-to brian message dated "Sun, 01 Oct 2006 16:47:33 -0400" Date: Sun, 01 Oct 2006 18:41:50 -0400 Message-ID: <4834.1159742510@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200610/24 X-Sequence-Number: 101551 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