Here is how my function is looks:
create or replace function datafabric.test(psi_codes text[])
returns table (asset character varying (255), parent_asset character varying (255))
as
$$
select asset, parent_asset
from americas.asset a
left join americas.prod_int p on a.row_id = p.row_id
where root_asset_id in (select root_asset_id from americas.asset where p.name = ANY($1))
$$ LANGUAGE 'SQL' VOLATILE;
However, the problem is that I am getting this
ERROR: function datafabric.test() does not exist SQL state: 42883 DURING the CREATION OF THE FUNCTION.
Please note that this function works. However, I want to output the results on pgadmin screen. I am not able to do that now.
Please help. I am using postgresql 8.3 version.
alter function? It's invalid syntax. And please don't put the language name in single quotes - it's an identifier.