Peter Eisentraut <[EMAIL PROTECTED]> writes:
> I was wondering whether, as a future project, we could make this more
> convenient by parsing the body of the function with the binding of the
> function already in effect.
Seems like a simple rearrangement of the code. First insert the pg_proc
entr
While looking to implement the ODBC replace() function (replace occurences
of $2 in $1 by $3), I found that it could be expressed as:
CREATE FUNCTION replace(text, text, text) RETURNS text AS '
select
case when position($2 in $1) = 0 or char_length($2) = 0
then $1