PostgreSQL does not provide an equivalent to the MySQL FIELD function. It is possible to create such a function, although the syntax is version-dependent (and creates a persistent database object, which so far has not been done by this plugin). So use a generic CASE statement. Fixes: #12 Signed-off-by: Kevin Locke <kevin@kevinlocke.name>