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 6C39932A860 for ; Wed, 13 Oct 2004 16:54:38 +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 36936-05 for ; Wed, 13 Oct 2004 15:54:33 +0000 (GMT) Received: from poweredge.attiksystem.ch (adsl-soholight-4-c59-p029.vtx.ch [212.147.59.29]) by svr1.postgresql.org (Postfix) with ESMTP id BAE5D32A75F for ; Wed, 13 Oct 2004 16:54:32 +0100 (BST) Subject: Re: Plperlu function & backticks return value -> truncated? MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Date: Wed, 13 Oct 2004 17:54:31 +0200 Message-ID: <6C0CF58A187DA5479245E0830AF84F42142C56@poweredge.attiksystem.ch> X-MimeOLE: Produced By Microsoft Exchange V6.0.6487.1 content-class: urn:content-classes:message X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [SQL] Plperlu function & backticks return value -> truncated? Thread-Index: AcSxO+1GLr9nvmBITCO7BiplIZprrQAAMUVg From: "Philippe Lang" To: "Michael Fuhr" Cc: 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/94 X-Sequence-Number: 19197 Thanks! That's perfect... `ps -awfux | grep postgres` runs fine... -----Message d'origine----- De : Michael Fuhr [mailto:mike@fuhr.org]=20 Envoy=E9 : mercredi, 13. octobre 2004 17:47 =C0 : Philippe Lang Cc : pgsql-sql@postgresql.org Objet : Re: [SQL] Plperlu function & backticks return value -> truncated? On Wed, Oct 13, 2004 at 05:07:05PM +0200, Philippe Lang wrote: > When run directly from a shell, this code: >=20 > $ps =3D `ps -afux | grep postgres`; > @fields =3D split /\n/, $ps; > return "{" . join(",", @fields) . "}"; >=20 > ... runs fine. >=20 > But when run inside a plperlu function, lines are being truncated=20 > after a certain width. Many versions of ps truncate lines at a certain length if they can't determ= ine the terminal size. Since you're running ps from inside the backend, th= ere's probably no terminal to check. Check the ps manual page to see if it= supports an option like -w (or multiple occurrences of -w) to increase the= line length. -- Michael Fuhr http://www.fuhr.org/~mfuhr/