What is the currently recommended way to access a postgres database?

pljulia example ( from the readme ):

CREATE FUNCTION julia_setof_int()
RETURNS SETOF INTEGER AS $$
    for i in 1:5
        return_next(i)
    end
$$ LANGUAGE pljulia;

SELECT julia_setof_int();
 julia_setof_int 
-----------------
               1
               2
               3
               4
               5
(5 rows)

CREATE FUNCTION julia_setof_array()
RETURNS SETOF INTEGER[] AS $$
x =[[1,2], [3,4]]
for i in x
    return_next(i)
end
$$ LANGUAGE pljulia;

SELECT julia_setof_array();
 julia_setof_array 
-------------------
 {1,2}
 {3,4}
(2 rows)