Re: [PATCHES] Eliminate more detoast copies for packed varlenas

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Gregory Stark <stark(at)enterprisedb(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCHES] Eliminate more detoast copies for packed varlenas
Date: 2007-09-23 13:09:50
Message-ID: 46F6659E.80501@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Gregory Stark wrote:
> "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
>
>
>> Gregory Stark <stark(at)enterprisedb(dot)com> writes:
>>
>>> Ok, this removes what should be most if not all of the call sites where we're
>>> detoasting text or byteas. In particular it gets all the regexp/like functions
>>> and all the trim/pad functions. It also gets hashtext and hash_any.
>>>
>> Applied with some fixes --- you'd missed like_match.c, which doubtless
>> explains Guillame's complaint that it didn't work ...
>>
>
> Strange. It passed all regression tests for me and it seems like this is
> something that would have been caught even in single-byte mode by a simple
> test. It seems to me that like_match.c only used for SIMILAR is that right?
> That would explain it as there don't appear to be any tests of SIMILAR.
>
>

No. like_match.c contains the template for all the various incarnations
of LIKE and ILIKE functions. It is included multiple times with
different sets of #defines in like.c to create those functions
(currently there are 4 of them). It also supplies the template for the
like_escape functions, and this is where the macros are used. Those
functions are apparently only called if there is an explicit ESCAPE
clause. Some of our regression tests do have this, so I'm not sure what
happened.

cheers

andrew

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Treat 2007-09-23 14:16:44 Re: HOT is applied
Previous Message Gregory Stark 2007-09-23 12:44:04 Re: [PATCHES] Eliminate more detoast copies for packed varlenas

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2007-09-23 15:38:46 Re: [PATCHES] Eliminate more detoast copies for packed varlenas
Previous Message Gregory Stark 2007-09-23 12:44:04 Re: [PATCHES] Eliminate more detoast copies for packed varlenas