> On Jun 18, 2018, at 9:47 AM, Łukasz Jarych <jaryszek(at)gmail(dot)com> wrote:
>
> CREATE OR REPLACE FUNCTION totalRecords ()
> RETURNS integer AS $total$
> declare
> total integer;
> BEGIN
> SELECT count(*) into total FROM COMPANY;
> RETURN total;
> END;
> $total$ LANGUAGE plpgsql;