Aliases on Windows are set using the SQL Server Configuration Manager GUI. The Linux equivalent is mssql-conf, but there isn't an equivalent to aliases on Linux.
(I don't think this is a case of "isn't supported yet" related to Linux support being relatively new. My guess on the future is just a hunch & guessing rather than fact.)
If you need ...
Q: But still i am getting all rows at the end of the function and no
Unfortunately these results are accumulated (as opposed to streamed) by the server-side implementation of RETURN QUERY. This is explicitly mentioned in the documentation:
The current implementation of RETURN NEXT and RETURN QUERY stores the
entire result set before ...