Specifically I'm trying to use a table type definition in my function.
CREATE TYPE "MYSCHEMA"."TT_MYTABLE" AS TABLE (
CREATE FUNCTION "MYSCHEMA"."MYFUNCTION"()
RETURNS TABLE ("MYSCHEMA"."TT_MYTABLE")
All the function examples use an actual field definitions and not an predefined table type. I've tried the above and a bunch of other variations but I get a syntax error on all of them.
This is the documentation page;
They don't show any examples using the table types and I can't seem to make sense of " <datatype> ::= <sql_type> | <table_type>".