code in docs gives me an error - Mailing list pgsql-docs

From Hicham G. Elmongui
Subject code in docs gives me an error
Date
Msg-id cl37t2$95f$1@news.hub.org
Whole thread Raw
Responses Re: code in docs gives me an error  (Oliver Elphick <olly@lfix.co.uk>)
List pgsql-docs
Hi
I tried creating the function (from sec 19.3.1). But it gives me the
following error: "ERROR:  type tablename does not exist".
Any ideas of what i might be doing wrong?

CREATE FUNCTION use_many_fields(tablename) RETURNS TEXT AS '
DECLARE
    in_t ALIAS FOR $1;
BEGIN
    RETURN in_t.f1 || in_t.f3 || in_t.f5 || in_t.f7;
END;
' LANGUAGE 'plpgsql';




Thanks,
--Hicham



pgsql-docs by date:

Previous
From: "Mark Dexter"
Date:
Subject: UPDATE Query Example
Next
From: Oliver Elphick
Date:
Subject: Re: code in docs gives me an error