473,668 Members | 2,487 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Excute comnands OS from plpgsql

Hi!! Is there a way to execute script in OS from plpgsql???

_______________ _______________ _______________ _______________ _____
Charla con tus amigos en línea mediante MSN Messenger:
http://messenger.yupimsn.com/
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postg resql.org

Nov 12 '05 #1
12 2212
Yes, you can use plsh

http://developer.postgresql.org/~petere/plsh.html

regards
Pavel

On Tue, 14 Oct 2003, Edwin Quijada wrote:
Hi!! Is there a way to execute script in OS from plpgsql???

_______________ _______________ _______________ _______________ _____
Charla con tus amigos en línea mediante MSN Messenger:
http://messenger.yupimsn.com/
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postg resql.org

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 12 '05 #2
Edwin Quijada writes:
Hi!! Is there a way to execute script in OS from plpgsql???


No, you need to call a function written in an untrusted language, such as
PL/perlu.

--
Peter Eisentraut pe*****@gmx.net
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 12 '05 #3
CoL
hi,

Pavel Stehule wrote, On 10/14/2003 5:47 PM:
Yes, you can use plsh

http://developer.postgresql.org/~petere/plsh.html

regards
Pavel


or plperl, or plphp too :)

C.

Nov 12 '05 #4
On Tuesday 14 October 2003 16:38, Edwin Quijada wrote:
Hi!! Is there a way to execute script in OS from plpgsql???


I think there's a pl/sh procedural language (in contrib or gborg iirc), but
you could probably use any of the untrusted procedural languages.

Better, would be to use the LISTEN/NOTIFY feature to talk to an external
daemon that handles things for you, otherwise your script will run as the
same user as the backend.

--
Richard Huxton
Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 12 '05 #5
On Tue, 14 Oct 2003, CoL wrote:
hi,

Pavel Stehule wrote, On 10/14/2003 5:47 PM:
Yes, you can use plsh

http://developer.postgresql.org/~petere/plsh.html

regards
Pavel


or plperl, or plphp too :)


I think the new version must run in safe mode, as it installs as a trusted
language, or at least that's the impression I got.

Senior Drake?
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 12 '05 #6
On Tuesday 14 October 2003 17:15, Richard Huxton wrote:
On Tuesday 14 October 2003 16:38, Edwin Quijada wrote: How can I use NOtify to do this?


Please make sure you reply to the list too.

In your daemon you do something like: "LISTEN signal1", and in a trigger (say)
you issue "NOTIFY signal1". Your daemon will receive an asynchronoums message
"signal1" and you can then check the relevant tables for
updates/deletions/whatever signal1 means.

In practice, I usually don't care about responding that quickly, and just have
a cron job start up a script every 5 mins to check a "pending_jo bs" table.

--
Richard Huxton
Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 12 '05 #7
Richard Huxton wrote:
On Tuesday 14 October 2003 16:38, Edwin Quijada wrote:
Hi!! Is there a way to execute script in OS from plpgsql???


I think there's a pl/sh procedural language (in contrib or gborg iirc), but
you could probably use any of the untrusted procedural languages.


There is certainly PL/TclU in the core distro.
Jan

--
#============== =============== =============== =============== ===========#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#============== =============== =============== ====== Ja******@Yahoo. com #
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 12 '05 #8
CoL
hi,

Pavel Stehule wrote, On 10/14/2003 5:47 PM:
Yes, you can use plsh

http://developer.postgresql.org/~petere/plsh.html

regards
Pavel


or plperl, or plphp too :)

C.

Nov 12 '05 #9
On Tue, 14 Oct 2003, CoL wrote:
hi,

Pavel Stehule wrote, On 10/14/2003 5:47 PM:
Yes, you can use plsh

http://developer.postgresql.org/~petere/plsh.html

regards
Pavel


or plperl, or plphp too :)


I think the new version must run in safe mode, as it installs as a trusted
language, or at least that's the impression I got.

Senior Drake?
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 12 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
4455
by: Mark Mikulec | last post by:
Hi there, I wonder if anyone can shed some light on a very frustrating problem. I'm running a debian linux 3.0 "woody" server, nothing special, with the latest version of postres that apt-get will allow me, which I *think* it;s 7.1 something, I don't know how to figure out the postgres version. Anywho - I'm trying to backup my databases, which I did at one point, but I have no idea what happened, could have been an upgrade. My Dbs...
4
521
by: Edwin Quijada | last post by:
Hi!! Is there a way to execute script in OS from plpgsql??? _________________________________________________________________ Charla con tus amigos en línea mediante MSN Messenger: http://messenger.yupimsn.com/ ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
6
3967
by: Martin Marques | last post by:
We are trying to make some things work with plpgsql. The problem is that I built several functions that call one another, and I thought that the way of calling it was just making the assign: var:=func1(arg1,arg2); which gave me an error near ")". Now if I did the same, but like this:
1
2462
by: Rajesh Kumar Mallah | last post by:
Hi, profile_row profile_master%ROWTYPE; in a plpgsql function gives the error below tradein_clients=# SELECT general.create_accounts(); WARNING: plpgsql: ERROR during compile of create_accounts near line 8
0
2680
by: Steve Wampler | last post by:
Hmmm, I've always used plpgsql.so (also formerly known as libplpgsql.so, I think...) as in: CREATE FUNCTION plpgsql_call_handler () RETURNS language_handler AS '/usr/lib/plpgsql.so', 'plpgsql_call_handler' LANGUAGE c; CREATE TRUSTED PROCEDURAL LANGUAGE plpgsql HANDLER plpgsql_call_handler;
10
2929
by: lnd | last post by:
After copied pg database from one PC to another -I could not find plpgsql function(s) in the copied database. -had to instal plpgsql language handler again -whilst tables and data moved fine The copy included all under /cygwin/usr/local/pgsql/data and database was down while making a copy.
4
4956
by: Bill Moran | last post by:
I've got a bit of a strange problem that's causing me some MAJOR headaches. I'm developing the server-side of a large database application in PostgreSQL. This consists of a C daemon, and a LOT of stored functions in the database. I'm developing this in conjunction with another company, who is developing the the client side. I've got a 7.4 server that I'm developing on, and once a day I push my changes up to a common
14
5795
by: Karl O. Pinc | last post by:
Hi, Thought perhaps some other eyes than mine can tell if I'm doing something wrong here or if there's a bug somewhere. I've never passed a ROWTYPE varaible to a function but I don't see where the problem is. I keep getting errors like (the first is my debug output): NOTICE: last cycle is: 11 WARNING: Error occurred while executing PL/pgSQL function
0
1465
by: sripathy sena | last post by:
Hi, I am trying to install OPenacs with postgres 7.4.3 as the database. The openacs requires plpgsql to be installed. When I try to do this by running "CREATELANG plpgsql template1". I get a message file plpgsql not found in lib directory.
1
2200
by: Karl O. Pinc | last post by:
FYI, mostly. But I do have questions as to how to write code that will continue to work in subsequent postgresql versions. See code below. begintest() uses EXIT to exit a BEGIN block from within nested loops. No problem. begintest2() simplifies this, omitting the nested loops. Still no problem.
0
8462
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8381
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8799
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8658
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6209
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4205
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4380
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2792
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1786
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.