Postgres C API
Drop table A
// Drop table A
{
res = PQexec(cnxn, "drop table if exists A")
if (PQresultStatus(res) != PGRES_COMMAND_OK) {
PQclear(res);
oops(cnxn, "drop failed");
}
// res has to be cleared after receiving a value
PQclear(res);
printf("Table A does not exist\n");
}
|