diff --git a/src/interfaces/ecpg/test/expected/preproc-strings.c b/src/interfaces/ecpg/test/expected/preproc-strings.c index aa0bf6e877d6d911ef81f8b9bb4a2d075b6f2982..b72d9eeadd0ed5b807e2e750ee13433189033734 100644 --- a/src/interfaces/ecpg/test/expected/preproc-strings.c +++ b/src/interfaces/ecpg/test/expected/preproc-strings.c @@ -37,6 +37,10 @@ int main(void) #line 13 "strings.pgc" + { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "set standard_conforming_strings to on", ECPGt_EOIT, ECPGt_EORT);} +#line 15 "strings.pgc" + + { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select 'abcdef' , N'abcdef' as foo , E'abc\\bdef' as \"foo\" , U&'d\\0061t\\0061' as U&\"foo\" , U&'d!+000061t!+000061' uescape '!' , $foo$abc$def$foo$", ECPGt_EOIT, ECPGt_char,&(s1),(long)0,(long)1,(1)*sizeof(char), ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, @@ -50,13 +54,13 @@ int main(void) ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_char,&(s6),(long)0,(long)1,(1)*sizeof(char), ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);} -#line 21 "strings.pgc" +#line 23 "strings.pgc" printf("%s %s %s %s %s %s\n", s1, s2, s3, s4, s5, s6); { ECPGdisconnect(__LINE__, "CURRENT");} -#line 25 "strings.pgc" +#line 27 "strings.pgc" exit (0); } diff --git a/src/interfaces/ecpg/test/expected/preproc-strings.stderr b/src/interfaces/ecpg/test/expected/preproc-strings.stderr index 7ae7510f55c5f934b20374ec40b3ed88a9dfb2c1..e9a6ebf1732a9ba9d0a09822a22cdcebaf28df10 100644 --- a/src/interfaces/ecpg/test/expected/preproc-strings.stderr +++ b/src/interfaces/ecpg/test/expected/preproc-strings.stderr @@ -2,35 +2,41 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ECPGconnect: opening database regress1 on <DEFAULT> port <DEFAULT> [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 15: query: select 'abcdef' , N'abcdef' as foo , E'abc\bdef' as "foo" , U&'d\0061t\0061' as U&"foo" , U&'d!+000061t!+000061' uescape '!' , $foo$abc$def$foo$; with 0 parameter(s) on connection regress1 +[NO_PID]: ecpg_execute on line 15: query: set standard_conforming_strings to on; with 0 parameter(s) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 15: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 15: correctly got 1 tuples with 6 fields +[NO_PID]: ecpg_execute on line 15: OK: SET [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_store_result on line 15: allocating memory for 1 tuples +[NO_PID]: ecpg_execute on line 17: query: select 'abcdef' , N'abcdef' as foo , E'abc\bdef' as "foo" , U&'d\0061t\0061' as U&"foo" , U&'d!+000061t!+000061' uescape '!' , $foo$abc$def$foo$; with 0 parameter(s) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 15: RESULT: abcdef offset: -1; array: yes +[NO_PID]: ecpg_execute on line 17: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_store_result on line 15: allocating memory for 1 tuples +[NO_PID]: ecpg_execute on line 17: correctly got 1 tuples with 6 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 15: RESULT: abcdef offset: -1; array: yes +[NO_PID]: ecpg_store_result on line 17: allocating memory for 1 tuples [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_store_result on line 15: allocating memory for 1 tuples +[NO_PID]: ecpg_get_data on line 17: RESULT: abcdef offset: -1; array: yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 15: RESULT: abcdef offset: -1; array: yes +[NO_PID]: ecpg_store_result on line 17: allocating memory for 1 tuples [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_store_result on line 15: allocating memory for 1 tuples +[NO_PID]: ecpg_get_data on line 17: RESULT: abcdef offset: -1; array: yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 15: RESULT: data offset: -1; array: yes +[NO_PID]: ecpg_store_result on line 17: allocating memory for 1 tuples [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_store_result on line 15: allocating memory for 1 tuples +[NO_PID]: ecpg_get_data on line 17: RESULT: abcdef offset: -1; array: yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 15: RESULT: data offset: -1; array: yes +[NO_PID]: ecpg_store_result on line 17: allocating memory for 1 tuples [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_store_result on line 15: allocating memory for 1 tuples +[NO_PID]: ecpg_get_data on line 17: RESULT: data offset: -1; array: yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 15: RESULT: abc$def offset: -1; array: yes +[NO_PID]: ecpg_store_result on line 17: allocating memory for 1 tuples +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_get_data on line 17: RESULT: data offset: -1; array: yes +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_store_result on line 17: allocating memory for 1 tuples +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_get_data on line 17: RESULT: abc$def offset: -1; array: yes [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_finish: connection regress1 closed [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/preproc/strings.pgc b/src/interfaces/ecpg/test/preproc/strings.pgc index 1a8c0d707df214bc981a254ee98e370174656678..cfea7aa034e4c8dfbb230f253af9254f54027177 100644 --- a/src/interfaces/ecpg/test/preproc/strings.pgc +++ b/src/interfaces/ecpg/test/preproc/strings.pgc @@ -12,6 +12,8 @@ int main(void) exec sql connect to REGRESSDB1; + exec sql set standard_conforming_strings to on; + exec sql select 'abcdef', N'abcdef' AS foo, E'abc\bdef' AS "foo",