• #include <libpq-fe.h>: Include the file containing declarations of libpq functions.

  • static void oops(PGconn *cnxn): A function to clean up when things go wrong. Exit code of 1 indicates that the program encountered a problem.

  • stderr: Print on stderr because we are describing an error.

  • PGresult *res: Receive the return value from database operations, usually an error code.

  • PGconn *cnxn: The connection. Used in all database operations.

  • return 0: Exit code of 0 means that nothing went wrong.