This documentation is for an unsupported version of PostgreSQL.
You may want to view the same page for the
version, or one of the supported versions listed above instead.
query -- execute a SQL command
SQL command (string).
Bad argument type, or too many arguments.
Empty SQL query.
Error during query processing, or invalid
query() method sends a
SQL query to the database. If
the query is an insert statement, the return value is the
OID of the newly inserted row.
If it is otherwise a query that does not return a result (i.e.,
is not a some kind of SELECT statement),
it returns None. Otherwise, it returns a
pgqueryobject that can be accessed
dictresult() methods or simply printed.