"Ron St.Pierre" <rstpierre(at)syscor(dot)com> writes:
> CREATE OR REPLACE FUNCTION getnumber(varchar(1)) RETURNS integer AS '
> BEGIN
> return ($1 ~ '[0-9]');
> END;
> ' LANGUAGE 'plpgsql';
> I get the following error:
> parse error at or near "["
You need to double the quotes in the function body, viz
...
return ($1 ~ ''[0-9]'');
...
Backslash-quote (\') is an alternative way.
regards, tom lane