Re: Calling a Postgres utility in pgpsql function

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Vish Phaneendra <vish(at)greenplum(dot)com>
Cc: pgadmin-support(at)postgresql(dot)org
Subject: Re: Calling a Postgres utility in pgpsql function
Date: 2009-06-09 07:58:53
Message-ID: 4A2E163D.1010501@lelarge.info
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

Vish Phaneendra a écrit :
> [...]
> Is it possible to call a postgres utility from pgpsql function? I'm
> trying to get the table definition using the pgpsql function.
>
> CREATE FUNCTION table_definition(text) RETURNS text AS $$
> pg_dump -st $1
> $$ LANGUAGE plpgsql;
>

No, you can't with PL/pgsql. But you can certainly do that with
untrusted PL like PL/Perlu or PL/Pythonu.

--
Guillaume.
http://www.postgresqlfr.org
http://dalibo.com

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Sufficool, Stanley 2009-06-09 15:13:04 Re: Calling a Postgres utility in pgpsql function
Previous Message Vish Phaneendra 2009-06-09 06:03:42 Calling a Postgres utility in pgpsql function