LIKE/ESCAPE implementation - Mailing list pgsql-hackers

From Thomas Lockhart
Subject LIKE/ESCAPE implementation
Date
Msg-id 398BB2FB.71071F9D@alumni.caltech.edu
Whole thread Raw
Responses Re: LIKE/ESCAPE implementation
List pgsql-hackers
It finally dawned on my how to easily implement the LIKE/ESCAPE clause.
Currently, LIKE is transformed to the "~~" operator in the parser. For
LIKE/ESCAPE, we should instead transform it to a three-parameter
function call. The rest of the implementation is likely to be trivial
(as is this parsing solution).

Does anyone see a problem with this solution? Should I also change the
existing "two parameter" implementation to look for a function call
instead of an operator (I think so, but...)?

Someone has been working on an "SQL generator function", which will be
used to generate output (??). The "like()" function should be
transformed back to the SQL9x clause; any hints on where to look (or
volunteers to fix that part)?
                    - Thomas


pgsql-hackers by date:

Previous
From: Thomas Lockhart
Date:
Subject: Re: Quoting fun
Next
From: Thomas Swan
Date:
Subject: Re: LIKE/ESCAPE implementation