pllua / pllua-deprecated

[DEPRECATED] This repository is no longer maintained. Please follow https://github.com/pllua/pllua
197 stars 16 forks source link

Set returning functions don't return nulls #28

Closed eugwne closed 8 years ago

eugwne commented 8 years ago

This example returns one row [1], but expected 3 rows [1,null,2]

CREATE OR REPLACE FUNCTION pg_temp.srf()
RETURNS SETOF integer AS $$
  coroutine.yield(1)
  coroutine.yield(nil)
  coroutine.yield(2)
$$ LANGUAGE pllua;

select pg_temp.srf();