plsh icon indicating copy to clipboard operation
plsh copied to clipboard

SETOF

Open davidfetter opened this issue 7 years ago • 2 comments

While PL/sh will happily create a function returning SETOF TEXT, for example, I don't see a way to actually do such a thing. Is there something clever I've missed?

CREATE OR REPLACE FUNCTION ls(TEXT)
RETURNS SETOF TEXT
LANGUAGE plsh
AS $$
#!/bin/bash
ls "$1"
$$;

which is fine as far as it goes. However:

 SELECT * FROM ls('/Users');
    ls
-----------
 502648132+
 Shared   +
 wsroot
(1 row) <--- expected 3 rows here.

davidfetter avatar Jun 28 '17 22:06 davidfetter

Bump

davidfetter avatar Jul 06 '17 17:07 davidfetter

That would need a different language handler, I'd think.

df7cb avatar Mar 25 '19 12:03 df7cb