ALLOW_NEWLINE
Posted in 2020
Topics: Stored Procedures & SPL, Server Administration, Data Types & Schema Design
Hi.
I'm on 14.10.FC4W1.
I have ALLOW_NEWLINE set to 1 in my onconfig file.
But after I execute
execute procedure ifx_allow_newline('f');I still can insert strings with new line chars. Is this the expected behaviour?
This runs without an error:
drop procedure if exists check_nl();
create procedure check_nl() returns varchar(255);define s varchar(255);
let s = "String with "||chr(10)|| " a newline";
create temp table tt (a varchar(255));
insert into tt values(s);
execute procedure ifx_allow_newline('f');
insert into tt values(s);return s;
end procedure;
Thanks in advance,
-Snorri
------------------------------
Snorri Bergmann
------------------------------
#Informix
This parameter is only for the syntax check of the parser.
Example:
execute procedure ifx_allow_newline('t');select "This is a test for
NEWLINE"
from systables where tabid = 1;
(constant)
This is a test for
NEWLINE
1 row(s) retrieved.
execute procedure ifx_allow_newline('f');select "This is a test for
NEWLINE"
from systables where tabid = 1;
282: Found a quote for which there is no matching quote.
Error in line 4Newr character position 8
------------------------------
Gerd Kaluzinski
------------------------------
Thanks Gerd. The manual was not too clear on this IMO. Regs, -Snorri ------------------------------ Snorri Bergmann ------------------------------