473,386 Members | 1,673 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,386 software developers and data experts.

how to call a TCL function from within a plpgsql trigger?

Hi list,

That's the question, anyone knows a way to do that?

Thanks in advance,

Josue Maldonado.

Nov 11 '05 #1
2 1967
A tcl function is just like any other, you can call it from within a
plpgsql trigger function in the same way you would call a built-in, or
any other function. Having said that, I am not sure what the exact
plpgsql options are besides "SELECT myfunction(' 'foo' ', ' 'bar' ')
....." and don't know syntax for storing the returned value in a
variable. I'm a one-trick pony.

Josué Maldonado wrote:
Hi list,

That's the question, anyone knows a way to do that?

Thanks in advance,

Josue Maldonado.
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if
your
joining column's datatypes do not match



---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 11 '05 #2


Ian Harding wrote:
A tcl function is just like any other, you can call it from within a
plpgsql trigger function in the same way you would call a built-in, or
any other function. Having said that, I am not sure what the exact
plpgsql options are besides "SELECT myfunction(' 'foo' ', ' 'bar' ')
...." and don't know syntax for storing the returned value in a
variable. I'm a one-trick pony.
What about

plpgsql_variable := tcl_or_any_other_function();

You can also pass some arguments, but that doesn't count as another
trick, it's just a modification to an already seen one.

Jan

Josué Maldonado wrote:
Hi list,

That's the question, anyone knows a way to do that?

Thanks in advance,

Josue Maldonado.
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if
your
joining column's datatypes do not match



---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org


--
#================================================= =====================#
# 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 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 11 '05 #3

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

Similar topics

10
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...
1
by: Bruno BAGUETTE | last post by:
Hello, I'm trying to build a PL/PGSQL function that will be called by a trigger which will update a table named 'mview_contacts'. That table plays the role of a materialized view. The...
2
by: Karl O. Pinc | last post by:
I'm sure I saw something like this on the postgresql web site but the the search function is down in the documentation area. I'm unable to pass a function arguments in a CREATE TRIGGER...
5
by: Peter Erickson | last post by:
I am running postgresql 7.4.2 and having problems creating a trigger function properly. I keep getting the following error: ERROR: OLD used in query that is not in rule I have a table called...
9
by: Alexander Cohen | last post by:
(sorry for the double post if there is one - i sent the mail to the lisyt from the wrong address) Hi, Im passing this in the commmand line to start up the PostgreSQL server: ../pg_ctl start...
1
by: Vams | last post by:
Everyone, I need your help, I am trying to pass a parameter to a function that is to be called by a trigger. But, the correct function isn't being recognized and I am getting an error stating...
5
by: Raphael Bauduin | last post by:
Hi, I'm looking at the logging of a database we'll put in production soon. I've seen some posts on this list about history tables, like mentioned in...
3
by: tsarevich | last post by:
In Postgres 7.3.5 - When we try to insert a new record into our parties.party table which is then meant to fire off a trigger to update a column in the table with some de-normalised information,...
1
by: djdevx | last post by:
Dear all PostgreSQL xperts! Hi, I am newbie in PostgreSQL. I am currently developing an app that use PostgreSQL as a BackEnd Database. Now I am having problem with the function trigger since last...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.