When I issue something like this:
SELECT * FROM ads WHERE id=1004;
i get:
id | vpn_id | service_id | ignore_length | start_time |
end_time | ad_text
------+--------+------------+---------------+------------------------+------------------------+----------------------------1004
| 1 | 106 | f | 2005-01-01 00:00:00+01 |
2005-12-31 00:00:00+01 | Probna reklama numera una!
Now, I create a function that does that:
CREATE FUNCTION get_ads(int4)
RETURNS SETOF ads
AS
'SELECT * FROM ads WHERE id=$1'
LANGUAGE 'sql'
When I do:
SELECT * FROM get_ads(1004);
i get:
ERROR: query-specified return row and actual function return row do not
match
Why is that?
Mike
P.S. That's run on Postgres 7.4.
--
Mario Splivalo
Mob-Art
mario.splivalo@mobart.hr
"I can do it quick, I can do it cheap, I can do it well. Pick any two."