I get a record instead of a table when I
CREATE OR REPLACE FUNCTION public.func_obtener_calle(IN character varying)
RETURNS TABLE(tip_via_in character varying, nom_via character varying, geom geometry) AS
$BODY$
BEGIN
RETURN QUERY
SELECT *
FROM tramo_vial
WHERE (tramo_vial.nom_via like '%$1%' or tramo_vial.nom_via like upper('&$1%') or tramo_vial.nom_via like initcap('%$1%')); END; $BODY$ LANGUAGE plpgsql
I allways get a record and I need a table to use after.