Re: programming 'like' operator - Mailing list pgsql-general

From Tom Lane
Subject Re: programming 'like' operator
Date
Msg-id 23209.1170124758@sss.pgh.pa.us
Whole thread Raw
In response to programming 'like' operator  (Ron Peterson <ron.peterson@yellowbank.com>)
List pgsql-general
Ron Peterson <ron.peterson@yellowbank.com> writes:
> Anyone have any tips for an earnest aspiring but somewhat befuddled
> PostgreSQL acolyte as to what's required to program (in C) a 'like'
> operator for a user defined type?

Well, you could look at the existing code which is in
    src/backend/utils/adt/like.c
    src/backend/utils/adt/like_match.c
The text variant is a bit obfuscated because it tries to support
both case-sensitive and case-insensitive matching with only one
set of code --- the bytea variant might be easier to follow.

            regards, tom lane

pgsql-general by date:

Previous
From: "John D. Burger"
Date:
Subject: Re: Limit on number of users in postgresql?
Next
From: Christopher Browne
Date:
Subject: Re: PG Email Client