On Thu, August 14, 2008 02:00, Mickael Deloison wrote:

> There is a new patch for pgAdmin that includes pgScript. Maybe the

> Everything is here: http://pgscript.projects.postgresql.org/pgadmin/

Hi Mickael,

I played a bit with pgScript; I like it. Here are a few observations:


  1) It would be nice if pgScript would only execute a select-block, like the
normal pgAdmin querytool does.



  2) The example script from the url above says:

   IF (SELECT 1 FROM table)   -- Then table exists

which is only true if the table has rows, which of course initially it hasn't.
This totally confounds the pgScript newbie ;-)  Maybe it can be changed to:

   IF (SELECT count(*) FROM table)  -- Then table exists

  Now it will NOT fail when table exist, but is empty.

  This will make the snippet executable with pressing repeated F6.



  3) When the BEGIN - END block fails, pgScript executes the ELSE block.  This
seems questionable behaviour, no?  It can be seen with that same
above-mentioned script. (in the original 'IF (SELECT 1 FROM table)' form )


Great project - keep up the good work!


Erikjan Rijkers




-- 
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers

Reply via email to