plsh
plsh copied to clipboard
SETOF
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.
Bump
That would need a different language handler, I'd think.