If there's something going wrong in your program's interaction with a database, try running the same SQL in psql. See if you can get it to show the same behaviour, without the distractions of a non-SQL program around it.

Can you reproduce the problem in psql? Then chances are that there's something wrong with your SQL. Continue using psql to find the smallest bit of code that exhibits the problem. What you end up with is usually the source of your woes. Look for mistakes in your own SQL first, and search the Internet for reports of similar problems. If you are convinced that the DBMS is doing the wrong thing, report it to the pgsql-general mailing list.

If you can't reproduce, that still leaves several suspects:

  • Local setup. It sounds silly, but we do get some "bug reports" from problems of this kind. Check your configuration and so on:
    • Are you really connecting to the database you thought you were? Is it where you expected?
    • Do you have multiple versions of libpq or libpq installed? You shouldn't, but it happens. On most GNU systems, the shell command "locate libpq" should give you a list of related files.
    • Are your libpq and libpqxx installations up to date?
  • Your own program. Always look there first, and compare to the libpqxx test programs in the test directory. We don't just say that because we're too busy to deal with your problems: your program is the most likely suspect if...
    • the code that's giving you problems is newly written
    • your program does nothing very unusual as far as libpqxx usage is concerned
    • problems happen with functionality in your program that hasn't seen much use or systematic testing
  • libpqxx. Yes, we do have bugs sometimes.

If it looks like your problem is with libpqxx, here's what you can do:

  1. Check the list of known bugs to see if the problem may already be known. If your problem is listed there, you may want to add helpful information to the existing bug report.
  2. If the problem is not listed there, there is still a chance that it is a known problem but has already been fixed in the latest development version; in that case the bug will probably show up in the complete list of known bugs including closed ones under the nearest future milestone. In this case the current development version (see UsingThisSite) is likely to fix the problem.
  3. If there is any doubt whether your problem is caused by a real bug, or where exactly things go wrong, take a look at recent postings on the libpqxx-general mailing list archive. Somebody may have brought up the problem there. If noone has, or you have more to say about it, post your problem! Once the problem is clear, we will create a bug ticket for your problem.
  4. If all else fails, enter your bug report. This can be done directly from the New Ticket button in this site's button bar. Be sure to report what libpqxx version you're having problems with; leave the milestone field blank.

When reporting a bug, do not select "AAAAA" as the applicable module. We only have that field as a trap for automated bot networks that try to post spam to the bug tracker.