If your f1, f2, and f3 functions depend only on their arguments; that
is, if you call one
of those functions with the same set of arguments, it will return the
same answer every
time, you can define the functions as "iscachable" as follows:
create function f1()
...
language ...
with (iscachable
I would like to write a function as a set of SQL statements, and then
use that function
in a trigger. However, since triggers require a return type of opaque,
and SQL functions
cannot return type opaque, this doesn't look possible. Am I missing
something? The SQL
that I would expect to do this
The workaround I mentioned in the previous message doesn't turn out to
work after all.
The series of statements seems to require explicitly calling two functions.
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an app
I have a function that operates on two tables A and B, such that B has a
foreign key on A, as follows:
INSERT INTO A (...) several times
INSERT INTO B (...) several times, with foreign keys pointing to the new
members of A
DELETE FROM A (...), possibly including some of the newly added members
E