joseph speigle <joe(dot)speigle(at)jklh(dot)us> writes:
> CREATE or replace FUNCTION hostname() RETURNS setof logpgsql.stats_type as
> '
> declare
> ...
> newuri = substr(tempuri from 'http://[^/]*/.*');
You forgot about doubling quotes within a function body :-(
regards, tom lane