|< < 25 > >|

Postgres C API

Schema

create table A( x int, s varchar );

Application requirements

We are going to write a C program to:

  • Connect to the database.
  • Drop table A (if it exists).
  • Create table A.
  • Begin a transaction.
  • Delete all rows from A.
  • Insert some rows to A.
  • Run a query which gets all rows from A and print them.
  • Commits the transaction.
  • Disconnects from the database.

|< < 25 > >|