Re: [GENERAL] How to use dblink within pl/pgsql function:

2003-11-08 Thread Clive Page
Thanks to Joe Conway for pointing out a couple of typos in what I posted (the original code that I used didn't have quite as many, I edited it to try to simplify). He also pointed out that I had not initialised my 'count' variable, which was a genuine mistake. I am pleased to say that the correct

[GENERAL] How to use dblink within pl/pgsql function:

2003-11-03 Thread Clive Page
What I'd like to do is use dblink to extract a few rows from a remote database and manipulate these within a function in pl/pgsql. Something like this: CREATE OR REPLACE FUNCTION find() RETURNS INTEGER AS ' DECLARE count INTEGER: myrec RECORD; BEGIN FOR myrec IN SELECT * FROM DBLINK