We are using ECPG and host variables to connect to a postgres database. We're trying to understand when to use char[]
vs VARCHAR[]
as our host binding variable. The documentation doesn't provide any pros/cons or use-cases.
For example:
Given column
x VARCHAR (10)
Why would I use
EXEC SQL BEGIN DECLARE SECTION;
char theX[10];
EXEC SQL END DECLARE SECTION;
cout << theX;
vs. say
EXEC SQL BEGIN DECLARE SECTION;
VARCHAR theX[10];
EXEC SQL END DECLARE SECTION;
cout << theX.arr;
Thanks!