From: | Chris Browne <cbbrowne(at)acm(dot)org> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Fast REVERSE() function? |
Date: | 2008-09-08 16:37:15 |
Message-ID: | 873aka4mro.fsf@dba2.int.libertyrms.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
depesz(at)depesz(dot)com (hubert depesz lubaczewski) writes:
> On Mon, Sep 08, 2008 at 11:20:18AM -0400, Chris Browne wrote:
>> I've got a case where I need to reverse strings, and find that, oddly
>> enough, there isn't a C-based reverse() function.
>> A search turns up pl/pgsql and SQL implementations:
>
> just for completenes - there is also pl/perl and c versions freely
> available:
> http://www.depesz.com/index.php/2007/07/30/indexable-field-like-something/
> (pl/perl)
> http://blog.frosties.org/post/2007/08/28/Fonction-reverse-C-avec-PostgreSQL
> (c)
I hadn't thought about the Unicode issue (mentioned elsewhere in the
thread); that's a good reason why the method I mentioned *wouldn't* be
a good one!
I'm NOT interested in pl/perl as an option; building and deploying all
of Perl is a mighty expensive way to get *ONE* function (and I don't
think that fundamentally changes if it's 10 functions!).
In the long run, I'd be keen on there being a REVERSE function
available in pg_catalog, which is why I'm asking about the C version,
as that would be the way to put it into the "core."
--
"cbbrowne","@","linuxdatabases.info"
http://www3.sympatico.ca/cbbrowne/sap.html
DSK: STAN.K; ML EXIT -- FILE NOT FOUND
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2008-09-08 16:38:18 | sql2008 diff sql2003 |
Previous Message | Pavel Stehule | 2008-09-08 16:33:26 | Re: Fast REVERSE() function? |