Re: xp_cmdshell equivalent

From: joseph speigle <joe(dot)speigle(at)jklh(dot)us>
To: "'pgsql-novice(at)postgresql(dot)org'" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: xp_cmdshell equivalent
Date: 2003-12-20 04:09:31
Message-ID: 20031220040931.GA25061@www.sirfsup.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Fri, Dec 19, 2003 at 05:10:53PM -0500, Godshall Michael wrote:
>
> Is their equivalent to SQL Servers xp_cmdshell that can be called in plpsql
> or plperl function?
>
> Michael Godshall

A response on the net at http://archives.postgresql.org/pgsql-sql/2003-07/msg00362.php says just :

QUOTE

That can only be done inside an untrusted procedural language. plpgsql is
trusted, so it can't do that type of thing.

C, pltclu, plprelu, and, as of 7.4 plpython will let you do that.

END QUOTE

My guess (only a guess) is that the call would then vary per language, so in C it might be int system(const char * cmdstring) and so on. I found on google http://www.varlena.com/varlena/GeneralBits/32.html referencing what a trusted language is.
--
joe speigle

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Chris Travers 2003-12-21 12:00:40 Re: [NOVICE] PostgreSQL Training
Previous Message Godshall Michael 2003-12-19 22:10:53 xp_cmdshell equivalent