Search Postgresql Archives

Is there a bug in FOR i IN 1..10 LOOP (8.4.4)?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



CREATE FUNCTION test() RETURNS text
    LANGUAGE plpgsql
    AS $$DECLARE
  num_var TEXT;
BEGIN
  FOR i IN 1..10 LOOP
    num_var := num_var || ',' || i;
  END LOOP;
  RETURN num_var;
END;$$;

SELECT test();

returns NULL

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux