473,320 Members | 1,695 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

how to execute script from file within function

2
Hi,
is it posible to execute script from file within function (sql or pl/sql or ...)
Jan 20 '07 #1
4 12061
michaelb
534 Expert 512MB
If you want to execute a shell script, or an operating system command you may need to write your function in C, or java, or sh.
Check out these links:

http://www.postgresql.org/docs/8.2/static/xplang.html

http://www.postgresql.org/docs/8.2/s...ternal-pl.html
Jan 23 '07 #2
cupa
2
If you want to execute a shell script, or an operating system command you may need to write your function in C, or java, or sh.
Check out these links:

http://www.postgresql.org/docs/8.2/static/xplang.html

http://www.postgresql.org/docs/8.2/s...ternal-pl.html
OK,thanks.
And what about a SQL script from file?
Jan 25 '07 #3
michaelb
534 Expert 512MB
You can submit a file containing your sql statements using psql:
Expand|Select|Wrap|Line Numbers
  1. psql -f  <pathname>
  2.  
Jan 25 '07 #4
michaelb
534 Expert 512MB
I failed to mention that depending on whether the PG* variables are set in your environment the command-line to psql may need to include more arguments (dbname, username, etc)

follow this link for details:

http://www.postgresql.org/docs/8.0/i.../app-psql.html
Jan 25 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: | last post by:
my global.asa file doesn't seem to be executing in IIS and i don't know how to make them run. Any ideas how to execute the global.asa file in IIS 5.1 , please let me know. thank you very much.
4
by: paul dallaire | last post by:
HI! I want to execute a link witch is in JavaScript, How do we execute this in asp server side if possible? Basically I don't want anyone to see this link in the code view. this is the link...
4
by: MPennig | last post by:
Here's my situation. I have a function defined in my document's <head> section which adds a <script> tag to a specified <div> tag. The added <script> has a src="" attribute pointing to a PHP file,...
3
by: Lyle Fairfield | last post by:
MS-SQL Server utilities Enterprise Manager and Query Analyzer will model almost any MS-SQL object as a simple script file with a default ".sql" extension. But how to "run these files? They are...
9
by: tshad | last post by:
I have an example I copied from "programming asp.net" (o'reilly) and can't seem to get the Sub (writefile) to execute. It displays all the response.write lines that are called directly, but not...
17
by: CES | last post by:
All, I was wondering if their is a way of loading an external script fill from within a script?? <script language="javascript" type="text/javascript"> function test(var){ <script...
3
by: Spartanicus | last post by:
I need to execute a function after a link to a section within the same document has been clicked and the navigation has occurred. When using the onclick event handler the JS function is executed...
19
by: citronelu | last post by:
Is it possible to execute a binary string stored within a python script as executable code ? The script is run under Windows, and the binary code (a full executable file) is stored in a variable...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.