Re: String handling function, substring vs. substr - Mailing list pgsql-general

From Tom Lane
Subject Re: String handling function, substring vs. substr
Date
Msg-id 4834.1159742510@sss.pgh.pa.us
Whole thread Raw
In response to Re: String handling function, substring vs. substr  (brian <brian@zijn-digital.com>)
Responses Re: String handling function, substring vs. substr
List pgsql-general
brian <brian@zijn-digital.com> 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

pgsql-general by date:

Previous
From: brian
Date:
Subject: Re: String handling function, substring vs. substr
Next
From: "rlee0001"
Date:
Subject: Normal vs Surrogate Primary Keys...