Subject | Autotrim? |
---|---|
Author | syn.erpy |
Post date | 2012-03-02T01:38:05Z |
Hi,
we ran into a little problem regarding blanks.
Try the following code (FB 2.5.1):
<code>
create exception blank 'blank';
SET TERM ^ ;
create OR alter procedure p_test
as
begin
IF (' ' = '') THEN
exception blank;
end
^
SET TERM ; ^
execute procedure p_test;
</code>
If you run it, the exception is raised. My question is why Firebird thinks that a blank (or two or three or four for that matter) is the same as an empty string. Is this a bug or an intended feature?
Thanks in advance!
we ran into a little problem regarding blanks.
Try the following code (FB 2.5.1):
<code>
create exception blank 'blank';
SET TERM ^ ;
create OR alter procedure p_test
as
begin
IF (' ' = '') THEN
exception blank;
end
^
SET TERM ; ^
execute procedure p_test;
</code>
If you run it, the exception is raised. My question is why Firebird thinks that a blank (or two or three or four for that matter) is the same as an empty string. Is this a bug or an intended feature?
Thanks in advance!