Re: [pgScript patch] Improved test output + make use of pgAdmin UI for error output

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Mickael Deloison <mdeloison(at)gmail(dot)com>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: [pgScript patch] Improved test output + make use of pgAdmin UI for error output
Date: 2009-03-11 19:38:46
Message-ID: 937d27e10903111238j7d2abb41n7ea5b8cc9de64041@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

On Wed, Mar 11, 2009 at 5:51 PM, Mickael Deloison <mdeloison(at)gmail(dot)com> wrote:
> 2009/3/11 Dave Page <dpage(at)pgadmin(dot)org>:
>> Testing on Windows, it fails the first tests I try :-(
>>
>> select * from missing_table
>>
>> I get no error message at all. If I enter garbage, I just get the following:
>>
>> 1.0: syntax error, unexpected character
>
> This is normal: you do not have anything in the output because the
> query must be terminated with a semi-colon.
> I will look at that and add an error message.

Thanks - I think that would quickly become a gotcha otherwise!

> Add the semi-colon ";" and the query will be executed. An erroneous
> query (like this one where the table does not exist) is valid from the
> pgScript point of view. It returns a warning saying why the query did
> not work but does not stop. I wanted to do like this because sometimes
> with pgScript I test invalid queries and I do not want the script to
> be stopped.

OK.

> Add an empty line at the end and the error will go away. This is the
> way pgScript detects comments: the regular expression doing that is
> "--".*$. I need to see if I can add "End of file" is addition to "$".

Urgh.

>
> The problem you mentioned are things to improve but they have always
> been there and not linked to a recent patch.

OK, cool. I've committed the patch.

Thanks!

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message svn 2009-03-11 19:44:01 SVN Commit by dpage: r7680 - trunk/pgadmin3/pgadmin/pgscript/utilities
Previous Message svn 2009-03-11 19:35:52 SVN Commit by dpage: r7679 - in trunk/pgadmin3/pgadmin: frm include/pgscript include/pgscript/utilities pgscript pgscript/statements pgscript/utilities