Unsupported versions: 7.3 / 7.2 / 7.1
This documentation is for an unsupported version of PostgreSQL.
You may want to view the same page for the current version, or one of the other supported versions listed above instead.

inserttable

Name

inserttable -- inserts a list into a table

Synopsis

inserttable(table, values)

Parameters

table

The table name (string).

values

The list of rows values to insert (list).

Return Type

none

Exceptions

TypeError

Bad argument type or too many (any) arguments.

pg.error

Invalid connection.

Description

inserttable() method allows to quickly insert large blocks of data in a table: it inserts the whole values list into the given table. The list is a list of tuples/lists that define the values for each inserted row. The rows values may contain string, integer, long or double (real) values. Be very careful: this method does not typecheck the fields according to the table definition; it just look whether or not it knows how to handle such types.