Relative Content

Hints and Tricks

category

Vim plugins

The vim configuration file on a user basis is ~/.vimrc.  If you don’t have this file then make it. I always like to start vim with numbering on so the first thing I put in this file is set number   The global configuration file is /etc/vimrc.  in here I like to uncomment the following […]

Using PQexecparams with a char** array

In short, if you are creating an array of arguments to pass to PQexecparams() (i.e. char**) then you need to leave enough space to null terminate the array. Many C programs use a while loop to iterate through an array until they find a null pointer i.e. while (*argv) { //foo ++argv; }   As […]

Overloading functions when using time_t

One of the problems that we have when using postgresql is the management of time stamps.  This is especially true when using PQexecparams() for reasons that I will not go in to in this post; suffice it to say that when building INSERT statements that use time stamps you may need to get creative. One […]