0

I'm able to create a PL/pgSQL function successfully. But while running a function it response like below

SELECT  __find_locations() 

Successfully run. Total query runtime: 236 msec.
867 rows affected.

But I'm expecting it to return 867 rows

My function looks like:

CREATE OR REPLACE FUNCTION public.__find_locations() 
    RETURNS TABLE (j json) AS
    $$
        BEGIN
            RETURN QUERY SELECT row_to_json(data) from 
            (SELECT geonameid, latitude, longitude, country_code, country_name, 
             FROM public.locations) AS data; 
        END
    $$
    LANGUAGE 'plpgsql'

Any kind of help will much be appreciated.

Rajath
  • 2,611
  • 8
  • 27
  • 43

0 Answers0