format package:postgresql-simple

This returns whether the data was returned in a binary or textual format. Analogous to libpq's PQfformat.
Format a query string with a variable number of rows. This function is exposed to help with debugging and logging. Do not use it to prepare queries for execution. The query string must contain exactly one substitution group, identified by the SQL keyword "VALUES" (case insensitive) followed by an "(" character, a series of one or more "?" characters separated by commas, and a ")" character. White space in a substitution group is permitted. Throws FormatError if the query string could not be formatted correctly.
Format a query string. This function is exposed to help with debugging and logging. Do not use it to prepare queries for execution. String parameters are escaped according to the character set in use on the Connection. Throws FormatError if the query string could not be formatted correctly.
Exception thrown if a Query could not be formatted correctly. This may occur if the number of '?' characters in the query string does not match the number of parameters provided.
Parse one of three primitive field formats: array, quoted and plain.