dbTalk Databases Forums  

pgplpsql and the command line

comp.databases.postgresql.novice comp.databases.postgresql.novice


Discuss pgplpsql and the command line in the comp.databases.postgresql.novice forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Doug Boyd
 
Posts: n/a

Default pgplpsql and the command line - 02-05-2004 , 10:30 PM






G'day-

I'm running Postgresql 7.4.1 and pgplsql as a procedural language. I
want to call a java class from the command line inside a pgplsql
function and am not sure how to do it. In psql, one would simply

\! <put your command here>

Any idea/suggestion would be greatly appreciated.

Kind regards

Doug Boyd
Sydney, Australia


Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: pgplpsql and the command line - 02-07-2004 , 02:51 PM






"Doug Boyd" <dboyd (AT) raineandhorne (DOT) com> writes:
Quote:
I'm running Postgresql 7.4.1 and pgplsql as a procedural language. I
want to call a java class from the command line inside a pgplsql
function and am not sure how to do it.
You can't. Allowing access to command-line operations would be a
security risk, and plpgsql doesn't provide it.

You could do this in one of the "untrusted" PLs, such as plperlu.
Note that the java program would execute as the database user (eg,
"postgres"), not as the client user as psql's \! would do.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.