Greetings:
I am creating a Libpq program that reads a text file, and inserts values into a Postgres table. An example of my insert statement looks like this:
SPRINTF(str, “INSERT INTO itm_table (itm_num, itm_desc) values (‘%s’, ‘%s’);”, sitmnum, sitmdesc);
The insert blows up when it hits an item description that contains a single quote in the text.
Other than stripping the offending quote-marks from the text prior to processing, does anybody have any ideas how I can deal with this?
I appreciate all help!
Louise