From: | "Erikjan Rijkers" <er(at)xs4all(dot)nl> |
---|---|
To: | "Mickael Deloison" <mdeloison(at)gmail(dot)com> |
Cc: | pgadmin-hackers(at)postgresql(dot)org |
Subject: | Re: pgScript patch based on pgScript-1.0-beta-3 |
Date: | 2008-08-14 01:31:23 |
Message-ID: | 20063.156.83.0.124.1218677483.squirrel@webmail.xs4all.nl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-hackers |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Page | 2008-08-14 07:24:31 | Re: pgScript patch based on pgScript-1.0-beta-3 |
Previous Message | Mickael Deloison | 2008-08-14 00:00:57 | pgScript patch based on pgScript-1.0-beta-3 |