X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 1854432C19C for ; Wed, 13 Oct 2004 16:25:31 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 27107-04 for ; Wed, 13 Oct 2004 15:25:26 +0000 (GMT) Received: from anchor-post-32.mail.demon.net (anchor-post-32.mail.demon.net [194.217.242.90]) by svr1.postgresql.org (Postfix) with ESMTP id 9180432C1A3 for ; Wed, 13 Oct 2004 16:25:25 +0100 (BST) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-32.mail.demon.net with esmtp (Exim 4.42) id 1CHl0G-000Fw9-6s; Wed, 13 Oct 2004 15:25:24 +0000 Received: from [192.168.1.17] (client17.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id 7B549164AF; Wed, 13 Oct 2004 16:25:22 +0100 (BST) Message-ID: <416D48E3.50201@archonet.com> Date: Wed, 13 Oct 2004 16:25:23 +0100 From: Richard Huxton User-Agent: Mozilla Thunderbird 0.7 (X11/20040615) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Philippe Lang Cc: pgsql-sql@postgresql.org Subject: Re: Plperlu function & backticks return value -> truncated? References: <6C0CF58A187DA5479245E0830AF84F42142C54@poweredge.attiksystem.ch> In-Reply-To: <6C0CF58A187DA5479245E0830AF84F42142C54@poweredge.attiksystem.ch> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200410/91 X-Sequence-Number: 19194 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