joseph speigle <joe.speigle@jklh.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