Skip site navigation (1) Skip section navigation (2)

LIKE/ESCAPE implementation

From: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
To: Hackers List <pgsql-hackers(at)postgresql(dot)org>
Subject: LIKE/ESCAPE implementation
Date: 2000-08-05 06:23:55
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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

Next:From: Thomas SwanDate: 2000-08-05 06:26:00
Subject: Re: LIKE/ESCAPE implementation
Previous:From: Thomas LockhartDate: 2000-08-05 04:29:55
Subject: Re: Quoting fun

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group