Can I create a function in CRATEDB that select * from table

I tried creating this FUNCTION and get the error;

SQL Error [42601]: Unterminated dollar quote started at position 0 in SQL $BODY$. Expected terminating $$

Has anyone tried creating function that acts like a stored procured in CrateDB?

create or REPLACE function databasnamee.GET_DATA_FUNC_TABLE()
returns table 
( 
    v_id character varying, vi_firstname character varying
)
LANGUAGE 'PLPGSQL'

AS 
$BODY$
begin
return QUERY
    select ID,firstname from databasename.functiontest; 
end;
$BODY$;

Hi @greg_lovelace,

CrateDB only supports JavaScript for user defined functions