How can create an function (Stored Procedure / Stored Function) that select all column in the table in PgAdmin? That same same like this.
CREATE OR REPLACE FUNCTION GetAllUsers(IN userno integer)
RETURNS TABLE(all column) AS
$BODY$
BEGIN
RETURN QUERY
SELECT *
FROM Users W
WHERE w.UserNo = GetAllUsers.userno;
END;
$BODY$
LANGUAGE plpgsql VOLATILE
COST 100
ROWS 1000;
ALTER FUNCTION GetAllUsers(integer)
OWNER TO postgres;