Hi everybody.
Question is about pointers returned from functions.
There is function
that returns escaped version of passed str parameter.Code:char *PQescapeLiteral(PGconn *conn, const char *str, size_t length);
What happens with this pointer and memory allocated in case I use it in some way like this:
I mean if this pointer and allocated memory for it hang till the end of program, or it's automatically freed after printf?Code:printf("SELECT * FROM lala WHERE lolo = '%s'",PQescapeLiteral(DBConnection, "'''ddsa", 3))
Thanks in advance.