Re: [pgScript patch] Improved test output + make use of pgAdmin UI for error output
От | Dave Page |
---|---|
Тема | Re: [pgScript patch] Improved test output + make use of pgAdmin UI for error output |
Дата | |
Msg-id | 937d27e10903111034i5109a28fve3c87f21684a797@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [pgScript patch] Improved test output + make use of pgAdmin UI for error output (Dave Page <dpage@pgadmin.org>) |
Список | pgadmin-hackers |
Hmm, I see similar results if I revert the patch. I wonder if the one Magnus applied broke something? On Wed, Mar 11, 2009 at 5:24 PM, Dave Page <dpage@pgadmin.org> wrote: > Hi. > > On Wed, Mar 11, 2009 at 1:52 PM, Mickael Deloison <mdeloison@gmail.com> wrote: >> Hi, >> >> Attached to this email, three patches for pgScript: >> 1. The first one improves the output of the pgScript integration test >> suite: only a bash file has been modified. > > Applied. > >> 2. The second one corrects an extra space introduced in the output >> from the previous patch. > > Applied. > >> 3. The third one enables pgScript to use the pgAdmin UI for error >> output: when an error occurs while interpreting a script then the line >> where the error occurred is signaled. > > 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 > > If I enter this example from the docs: > > SET @A = INTEGER(100, 200); > PRINT @A; -- Prints an integer between 100 and 200 > PRINT @A; -- Prints another integer between 100 and 200 > > I get: > > 3.9-10: syntax error, unexpected '-' > > I would expect an error message from the first query, and nicely > formatted errors from the second and third tests (though actually I > wouldn't expect an error at all from the docs example). FWIW, other > (non-erroring) examples work fine: > > SET @PROGR@M#TITLE = 'pgScript'; > PRINT ''; > PRINT @PROGR@M#TITLE + ' features:'; > PRINT ''; > PRINT ' * Regular PostgreSQL commands'; > PRINT ' * Control-of-flow language'; > PRINT ' * Local variables'; > PRINT ' * Random data generators'; > > gives: > > [PGSCRIPT ] > [PGSCRIPT ] pgScript features: > [PGSCRIPT ] > [PGSCRIPT ] * Regular PostgreSQL commands > [PGSCRIPT ] * Control-of-flow language > [PGSCRIPT ] * Local variables > [PGSCRIPT ] * Random data generators > > and > > DECLARE @I, @T; -- Variable names begin with a @ > SET @I = 0; -- @I is an integer > WHILE @I < 20 > BEGIN > SET @T = 'table' + CAST (@I AS STRING); -- Casts @I > CREATE TABLE @T (id integer primary key, data text); > > SET @I = @I + 1; > END > > Outputs the queries and resulting notices as expected. > > -- > Dave Page > EnterpriseDB UK: http://www.enterprisedb.com > -- Dave Page EnterpriseDB UK: http://www.enterprisedb.com
В списке pgadmin-hackers по дате отправления: