[fpc-devel] TSQLScript doesn't execute last statement not terminated by '; ' (FTerminator)

Michael Van Canneyt michael at freepascal.org
Wed Sep 20 20:05:20 CEST 2017



On Sat, 16 Sep 2017, Ondrej Pokorny wrote:

> Hello,
>
> if I run this script with TSQLScript:
>
> INSERT INTO A (ID) VALUES (1);
> INSERT INTO A (ID) VALUES (2)
>
> Only the first insert is executed. Not the second one - it's ignored 
> because it lacks the terminating ';'. Furthermore, no exception is 
> raised - so I even don't know about it! IMO it is a bug.
>
> All 3 tools I have installed (pgAdmin for Postgres, SQL Studio for MSSQL 
> and SQLDeveloper for Oracle) do not ignore the last unterminated statement.
> (Btw. Pascal doesn't either:)
> begin
>   one;
>   two
> end;
>
> Should I fix it and send a patch?

Please do.

Michael.


More information about the fpc-devel mailing list