pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: Philippe Lang <philippe.lang@attiksystem.ch>
Cc: pgsql-sql@postgresql.org
Subject: Re: Plperlu function & backticks return value -> truncated?
Date: Wed, 13 Oct 2004 16:25:23 +0100
Message-ID: <416D48E3.50201@archonet.com> (raw)
In-Reply-To: <6C0CF58A187DA5479245E0830AF84F42142C54@poweredge.attiksystem.ch>
References: <6C0CF58A187DA5479245E0830AF84F42142C54@poweredge.attiksystem.ch>

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



view thread (5+ messages)  latest in thread

Message-ID: <416D48E3.50201@archonet.com>
Permalink:  ../416D48E3.50201@archonet.com/
Also on:    postgresql.org/message-id/416D48E3.50201@archonet.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: dev@archonet.com, philippe.lang@attiksystem.ch
  Subject: Re: Plperlu function & backticks return value -> truncated?
  In-Reply-To: <416D48E3.50201@archonet.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox