Re: xp_cmdshell equivalent - Mailing list pgsql-novice

From joseph speigle
Subject Re: xp_cmdshell equivalent
Date
Msg-id 20031220040931.GA25061@www.sirfsup.com
Whole thread Raw
In response to xp_cmdshell equivalent  (Godshall Michael <Michael_Godshall@gmachs.com>)
List 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
languageis. 
--
joe speigle

pgsql-novice by date:

Previous
From: Godshall Michael
Date:
Subject: xp_cmdshell equivalent
Next
From: "Chris"
Date:
Subject: postgres logs