Re: Plperlu function & backticks return value -> truncated?

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Plperlu function & backticks return value -> truncated?
Дата
Msg-id 416D48E3.50201@archonet.com
обсуждение исходный текст
Ответ на Plperlu function & backticks return value -> truncated?  ("Philippe Lang" <philippe.lang@attiksystem.ch>)
Список pgsql-sql
Philippe Lang wrote:
> Hello,
> 
> I'm using the following show_users() function in order to retreive in
> postgresql the output from the unix "ps" command.
> 
> When run directly from a shell, this code:
> 
>   $ps = `ps -afux | grep postgres`;
>   @fields = split /\n/, $ps;
>   return "{" . join(",", @fields) . "}";
> 
> ... runs fine.
> 
> But when run inside a plperlu function, lines are being truncated after
> a certain width.
> 
> Is that a known limitation of plperlu? Or maybe something else?

Depends if user_type is just a typo...

> ------------------------------------------------------------
> --  TYPE: line_type
> ------------------------------------------------------------
> CREATE TYPE public.line_type AS
> (
>   line text
> );

> CREATE FUNCTION public.show_users()
>   RETURNS SETOF user_type AS

>   user_rec     line_type%ROWTYPE;

--   Richard Huxton  Archonet Ltd


В списке pgsql-sql по дате отправления:

Предыдущее
От: "Philippe Lang"
Дата:
Сообщение: Plperlu function & backticks return value -> truncated?
Следующее
От: "Philippe Lang"
Дата:
Сообщение: Re: Plperlu function & backticks return value -> truncated?