dbTalk Databases Forums  

PL/pgSQL development tool

comp.databases.postgresql comp.databases.postgresql


Discuss PL/pgSQL development tool in the comp.databases.postgresql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Corrado Alesso
 
Posts: n/a

Default PL/pgSQL development tool - 03-20-2007 , 02:27 AM






Hi, does exist any development tool for PL/pgSQL? An environment where debug and
test stored procedeures...
Thank you

Corrado

Reply With Quote
  #2  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: PL/pgSQL development tool - 03-20-2007 , 10:13 AM






Corrado Alesso <coPUNTOalesso (AT) fastwebnet (DOT) it> wrote:
Quote:
Hi, does exist any development tool for PL/pgSQL? An environment where
debug and test stored procedeures...
There is no interactive debugger, if that's what you mean.

The best you can do is to send notices to the client, with

RAISE NOTICE 'I have entered the loop, %-th iteration', index;

or similar.

Yours,
Laurenz Albe


Reply With Quote
  #3  
Old   
Miloslav Hůla
 
Posts: n/a

Default Re: PL/pgSQL development tool - 03-20-2007 , 10:54 AM



Corrado Alesso napsal(a):
Quote:
Hi, does exist any development tool for PL/pgSQL? An environment where
debug and test stored procedeures...
Thank you

Corrado
Hi. There is a commerical, timelimit shareware too, EMS SQL Manager for
Postgres.

You can run debug, set breakpoints and step line by line with watch.

--
MiLo


Reply With Quote
  #4  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: PL/pgSQL development tool - 03-21-2007 , 04:19 AM



Miloslav H?la <M.Hula (AT) pod (DOT) cvut.cz> wrote:
Quote:
Hi, does exist any development tool for PL/pgSQL? An environment where
debug and test stored procedeures...
Thank you

Hi. There is a commerical, timelimit shareware too, EMS SQL Manager for
Postgres.

You can run debug, set breakpoints and step line by line with watch.
I have taken a look at that, because I wondered how a tool can offer
something that is not supported by the database server.

I found that what actually happens is that they parse and run the
stored procedures *on the client side*, issuing SQL statements against
the database as necessary.

This is impressive and frequently useful, but has the obvious limitation
that you're running a simulation and not the thing itself.

If there is a bug in PostgreSQL *or* EMS, the results may be different
and things will work in the simulation, but not in real life, or vice
versa.

Also, and more grave, PL/pgSQL changes from version to version.
You'd always need a version of EMS that matches exactly the PostgreSQL
version you are using.

I have actually run into that immediately when I tried EMS with a stored
procedure that used a statement that ran perfectly fine on PostgreSQL,
but gave me an error in the debugger.

One small example of differences between 8.1 and 8.2:
In 8.1 a FOR x IN SELECT ... loop requires x to be of a composite type,
while in 8.2 you can have a comma separated list of variables of a
simple type.

Yours,
Laurenz Albe


Reply With Quote
  #5  
Old   
Corrado Alesso
 
Posts: n/a

Default Re: PL/pgSQL development tool - 03-27-2007 , 03:53 PM



Sascha Bohnenkamp ha scritto:
Quote:
Hi, does exist any development tool for PL/pgSQL? An environment where
debug and test stored procedeures...
Thank you
I think EnterpriseDB (a commercial postgres derivate) has a debugger.
I am not yet sure if it works like the EMS stuff or if they have a
better integration.

First tests were promising ...

Thank you all for these useful replies.

Corrado


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.