Re: String handling function, substring vs. substr

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: brian <brian(at)zijn-digital(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: String handling function, substring vs. substr
Date: 2006-10-01 22:41:50
Message-ID: 4834.1159742510@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

brian <brian(at)zijn-digital(dot)com> writes:
> arsi(at)aranzo(dot)netg(dot)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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Fredrik Israelsson 2006-10-02 12:27:03 Installation placed on read only partition
Previous Message brian 2006-10-01 20:47:33 Re: String handling function, substring vs. substr

Browse pgsql-general by date

  From Date Subject
Next Message rlee0001 2006-10-02 00:58:28 Normal vs Surrogate Primary Keys...
Previous Message Michelle Konzack 2006-10-01 20:48:01 Re: pg web hosting with tsearch2?