I created the following function<br /><br />CREATE OR REPLACE FUNCTION getReminderServices( varchar ) RETURNS SETOF
reminder_servicesAS'<br /> DECLARE r reminder_services%ROWTYPE;<br /> BEGIN<br /> SELECT
dblink_connect(''dbname=''||$1);<br/> FOR r IN SELECT * FROM dblink(''SELECT * FROM reminder_services'')<br />
AS columns( uid INT,<br /> theme_uid INT,<br />
activity_MT_amount INT,<br />
activity_min_daysINT,<br /> activity_max_months INT,<br />
inactivity_days INT,<br /> limit_reminders
INT,<br/> limit_months INT,<br />
scanning_timeTIMESTAMP WITH TIME ZONE,<br /> reminder_time TIMESTAMP WITH TIME
ZONE,<br/> message TEXT)<br /> LOOP<br /> RETURN NEXT r;<br /> END
LOOP;<br/> SELECT dblink_disconnect($1);<br /> RETURN; <br /> END;<br /> ' LANGUAGE plpgsql; <br /><br /><br />
andI get the same errors. I think it is a problem with the dblink because<br /> the following function it works fine if
Icall SELECT * FROM getReminders().<br /><br /> CREATE OR REPLACE FUNCTION getReminders() RETURNS SETOF
reminder_servicesAS'<br /><br /> DECLARE r reminder_services%ROWTYPE;<br /><br /> BEGIN<br /> FOR r IN SELECT *
FROMreminder_services<br /> LOOP<br /> RETURN NEXT r;<br /> END LOOP;<br /> RETURN; <br /> END;<br /> '
LANGUAGEplpgsql; <br /><br /><br /><br /><br /><br />