PostgreSQL 7.2.1 Documentation
Prev |  | Next

# 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.

Prev | Home | Next
getnotify | Up | putline