From: Richard Huxton <dev@archonet.com>
To: Loredana Curugiu <loredana.curugiu@gmail.com>
Cc: Bart Degryse <Bart.Degryse@indicator.be>
Cc: Pavel Stehule <pavel.stehule@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: dblink inside plpgsql function
Date: Tue, 03 Jul 2007 13:32:13 +0100
Message-ID: <468A41CD.2070208@archonet.com> (raw)
In-Reply-To: <1c23c8e70707030525m59ee79d0r425813cd93131bbc@mail.gmail.com>
References: <1c23c8e70707030202n323ee171n20f39cdece5b3618@mail.gmail.com>
<162867790707030213h7c81e498p1b5f9d7c9cf1cc9b@mail.gmail.com>
<468A36F0.A3DD.0030.0@indicator.be>
<1c23c8e70707030525m59ee79d0r425813cd93131bbc@mail.gmail.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: dev@archonet.com, loredana.curugiu@gmail.com, Bart.Degryse@indicator.be, pavel.stehule@gmail.com
Subject: Re: dblink inside plpgsql function
In-Reply-To: <468A41CD.2070208@archonet.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox