You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
set heading off;
set term ^;
execute block returns(sttm varchar(100), result varchar(100)) as
begin
/*
sttm = 'select --#EDS#TAG#' || v_lf
|| 'current_time' || v_lf
|| 'from rdb$database'
;
*/
-- sttm = 'select 123 from rdb$database'; -- OK
-- sttm = 'select ''foo'' from rdb$database'; -- OK
-- sttm = 'select current_date from rdb$database'; -- OK
-- sttm = 'select 123456789012345678901234567890 from rdb$database'; -- OK (but only in 4.0 because this is greater than max bigint)
-- sttm = 'select cast(current_timestamp as timestamp) from rdb$database'; -- OK
\-\- sttm = 'select current\_time from rdb$database';
sttm = 'select current\_timestamp from rdb$database';
execute statement sttm into result;
suspend;
end
^
set term ;^
These two cases:
-- sttm = 'select current_time from rdb$database';
sttm = 'select current_timestamp from rdb$database';
-- lead to fail with
Statement failed, SQLSTATE = 07002
Dynamic SQL Error
-SQLDA error
-Data type unknown
-at SQLVAR index 0
No such problem in FB 3.x, and I could not find anything about this in README.incompatibilities.3to4.txt
Submitted by: @pavel-zotov
Please look at this:
set heading off;
set term ^;
execute block returns(sttm varchar(100), result varchar(100)) as
begin
/*
sttm = 'select --#EDS#TAG#' || v_lf
|| 'current_time' || v_lf
|| 'from rdb$database'
;
*/
-- sttm = 'select 123 from rdb$database'; -- OK
-- sttm = 'select ''foo'' from rdb$database'; -- OK
-- sttm = 'select current_date from rdb$database'; -- OK
-- sttm = 'select 123456789012345678901234567890 from rdb$database'; -- OK (but only in 4.0 because this is greater than max bigint)
-- sttm = 'select cast(current_timestamp as timestamp) from rdb$database'; -- OK
end
^
set term ;^
These two cases:
-- sttm = 'select current_time from rdb$database';
sttm = 'select current_timestamp from rdb$database';
-- lead to fail with
Statement failed, SQLSTATE = 07002
Dynamic SQL Error
-SQLDA error
-Data type unknown
-at SQLVAR index 0
No such problem in FB 3.x, and I could not find anything about this in README.incompatibilities.3to4.txt
Commits: d0fc106
The text was updated successfully, but these errors were encountered: