Re: dblink inside plpgsql function - Mailing list pgsql-sql

From Richard Huxton
Subject Re: dblink inside plpgsql function
Date
Msg-id 468A41CD.2070208@archonet.com
Whole thread Raw
In response to Re: dblink inside plpgsql function  ("Loredana Curugiu" <loredana.curugiu@gmail.com>)
Responses Re: dblink inside plpgsql function  ("Loredana Curugiu" <loredana.curugiu@gmail.com>)
List pgsql-sql
Loredana Curugiu wrote:
> I created the following function
> 
> CREATE OR REPLACE FUNCTION getReminderServices( varchar ) RETURNS SETOF
> reminder_services AS'
> DECLARE r reminder_services%ROWTYPE;
> BEGIN
>    SELECT dblink_connect(''dbname=''||$1);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

> and I get the same errors. I think it is a problem with the dblink because
> the following function it works fine if I call SELECT * FROM 
> getReminders().

You still haven't fixed the line above. The same rules apply to all SELECTs

--   Richard Huxton  Archonet Ltd


pgsql-sql by date:

Previous
From: "Loredana Curugiu"
Date:
Subject: Re: dblink inside plpgsql function
Next
From: "Loredana Curugiu"
Date:
Subject: Re: dblink inside plpgsql function