I have expected that host-variable bar the variable will be assigned the value 'aaa"bbb'
similarly if this value were obtained from a query:
#include <stdio.h>
int main()
{
EXEC SQL char *foo;
foo = (char *) malloc(5);
EXEC SQL SELECT 'aaa"bbb' INTO :foo;
printf("%s\n", foo);
return 0;
}
Result:
aaa"bbb
Hello
I have code:
void main()
{
char *foo = "aaa\"bbb";
EXEC SQL char *bar = "aaa\"bbb";
}
ecpg --version
ecpg (PostgreSQL) 13.0 (Ubuntu 13.0-1.pgdg20.04+1)
ecpg sample.pgc -o 1.c
sample .pgc:10: ERROR: unterminated quoted identifier
General usage questions regarding PostgreSQL and ECPG should be sent to the -general list.
What are you expecting to be the result of that?
David J.