title: libpq: get data type
body: <p>I am coding a cpp project with the database "postgreSQL".<br></p>
  
  <p>I created a table in my database its type is <code>character varying(40)</code>.<br></p>
  
  <p>Now I need to <code>SELECT</code> these data <code>FROM</code> the table in my cpp project. I knew that I should use the library <code>libpq</code>, this is the interface of "postgreSQL" for c/cpp.<br></p>
  
  <p>I have succeeded in selecting data from the table. Now I am considering if it's possible to get the data type of this table. For example, here I want to get <code>character varying(40)</code>.</p>