By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,809 Members | 1,999 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,809 IT Pros & Developers. It's quick & easy.

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

P: n/a
Hi list,

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

Thanks in advance,

Josue Maldonado.

Nov 11 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a


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 discussion thread is closed

Replies have been disabled for this discussion.