Is there a mapping between Postgresql data types to C data types
Similar to this question
Is there a mapping between Postgresql data types to C data types
Similar to this question
There's a tool specifically for that for client-side programming: libpqtypes.
For server-side programming, i.e. PostgreSQL extensions written in C and running in the PostgreSQL server executable, you need to use PostgreSQL's APIs directly.