Hi all,
I've been struggling with this for a while and haven't found anything
on the 'Net about it. I've created a function that takes two table
rows as a parameters. I'd like to use the output of a select (two
single rows) as the parameters, but I can't get it to work. What am I
missing?
The function prototype looks like this:
CREATE OR REPLACE FUNCTION queue.apply_routing_rule(
queue.messages,
queue.routing_rules
) RETURNS int2
and I would like to call it like this:
SELECT queue.apply_routing_rule(
(SELECT * from queue.messages WHERE id = 1),
(SELECT * from queue.routing_rules WHERE id = 1)
);
I get an error message along the lines of "sub-query must return a
single value". I've tried different combinations of "CAST" and "ROW"
functions, but they give syntax errors.
Any suggestions?
Regards,
Ami.
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly