PostgreSQL or pl/psSQL equivalent to MS SQL Server's xp_cmdshell?

Поиск
Список
Период
Сортировка
Искать

PostgreSQL or pl/psSQL equivalent to MS SQL Server's xp_cmdshell?

От:
Trent.Mera@PeopleFirst.com
Дата:

Does anyone know of the PostgreSQL or pl/psSQL equivalent to MS SQL Server's xp_cmdshell?   This is the command that allows you issue command-line statements from within SQL, e.g., you would do xp_cmdshell 'dir c:\' if you wanted to see the contents of the c: drive.

TM
**************************************************************************
The information transmitted herewith is sensitive information intended only for use by the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.

Re: PostgreSQL or pl/psSQL equivalent to MS SQL Server's

От:
"scott.marlowe" <scott.marlowe@ihs.com>
Дата:
On Thu, 24 Jul 2003 Trent.Mera@PeopleFirst.com wrote:

> Does anyone know of the PostgreSQL or pl/psSQL equivalent to MS SQL Server's
> xp_cmdshell?   This is the command that allows you issue command-line
> statements from within SQL, e.g., you would do xp_cmdshell 'dir c:\' if you
> wanted to see the contents of the c: drive.

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.




FAQ