Re: Can't get the debugger going

From: schatz <gaybana2000(at)hotmail(dot)com>
To: pgadmin-support(at)postgresql(dot)org
Subject: Re: Can't get the debugger going
Date: 2009-04-13 17:27:46
Message-ID: 23025672.post@talk.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support


- I enabled the option "Show system objects in the treeview" to see the
templates and this is done, thank you.Templates don't have any functions in
them?

- My platform is win XP. I created three schemas, each have different
tables. One schema will create a table with the data from the other tables
that resides in other two schemas. I need to write a cursor-loop-fetch
function to extract data from some fields from the two schemas and insert
into a new table in the third schema...I wrote a test function but can't
debug it and not sure if I should use sql or pl/pgsql.

This is a copy from Function treeview, not sure why it writes two headers
and adds more stuff to the bottom.
-- Function: "MySchema".create_data()

-- DROP FUNCTION "MySchema".create_data();

CREATE OR REPLACE FUNCTION "MySchema".create_data()
RETURNS void AS
$BODY$CREATE FUNCTION "MySchema".create_data() RETURNS varchar(3) AS '

DECLARE
my_cursor CURSOR for select prov from "SecondSchema".data_load;
province varchar(3);
BEGIN
open my_cursor;
RAISE info ''prov'';
RAISE INFO ''-----'';
LOOP
FETCH my_cursor INTO province;
RAISE INFO ''%'', province;
EXIT WHEN my_cursor%NOT FOUND;
RAISE INFO ''%'', province;
END LOOP;
CLOSE my_cursor;
return province;
END;
'LANGUAGE 'plpgsql';
$BODY$
LANGUAGE 'sql' VOLATILE
COST 100;
ALTER FUNCTION "MySchema".create_data() OWNER TO postgres;

- I tried to install the debugger by running the command you recommended in
the cmd window. Now when I run "C:...PostgreSQL\8.3\share\contrib\psql -f
pldbgapi.sql my_dbase" it says: "psql is not recognized as an internal or
external command, operable or batch file" Is that mean I don't have psql.exe
installed? I see it under the bin folder, when I run it from the cmd line it
asks me for a password. I tried the password for windows and postgresql both
don't work.
Schatz.

Raymond O'Donnell wrote:
>
> [Redirecting to the list]
>
> On 13/04/2009 16:33, gaybana2000(at)hotmail(dot)com wrote:
>> Thank you for your reply. I only have pgadmin3 installed. where do I
>> run these commands from. what do I need to install to rund these
>> command line commands?
>
> What platform are you on? Also, what exactly are you trying to do?
>
>> I looked in the docs for how to use the
>> pg_dumpall commands...don't know where to run these commands.
>
> You just run them at the system command line... if you're on Windows, go
> to Start -> Run and type 'cmd' to bring up a command prompt. Of course,
> you need to have these utilities installed in the first place - how you
> do this depends on your platform.
>
>> I also don't have template1 dbase.
>
> I think pgAdmin hides it by default. To see it (and a lot of other
> stuff), go to File -> Options -> Display, and check "Show system objects
> in the treeview"; then refresh the "Databases" node of the treeview by
> clicking on it and pressing F5.
>
> Ray.
>
> ------------------------------------------------------------------
> Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
> rod(at)iol(dot)ie
> Galway Cathedral Recitals: http://www.galwaycathedral.org/recitals
> ------------------------------------------------------------------
>
> --
> Sent via pgadmin-support mailing list (pgadmin-support(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-support
>
>

--
View this message in context: http://www.nabble.com/Can%27t-get-the-debugger-going-tp15271521p23025672.html
Sent from the PostgreSQL - pgadmin support mailing list archive at Nabble.com.

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Raymond O'Donnell 2009-04-13 20:30:54 Re: Can't get the debugger going
Previous Message Raymond O'Donnell 2009-04-13 16:14:52 Re: Can't get the debugger going