From 83d457361e1d438359439575d8adc489dc32cc5e Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Thu, 20 Oct 2011 11:07:24 +0100 Subject: [PATCH] Fixed docs for the copy null parameter --- doc/src/cursor.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/src/cursor.rst b/doc/src/cursor.rst index d2a59ddd..8eb339aa 100644 --- a/doc/src/cursor.rst +++ b/doc/src/cursor.rst @@ -457,7 +457,7 @@ The ``cursor`` class The :sql:`COPY` command is a PostgreSQL extension to the SQL standard. As such, its support is a Psycopg extension to the |DBAPI|. - .. method:: copy_from(file, table, sep='\\t', null='\\N', size=8192, columns=None) + .. method:: copy_from(file, table, sep='\\t', null='\\\\N', size=8192, columns=None) Read data *from* the file-like object *file* appending them to the table named *table*. See :ref:`copy` for an overview. @@ -467,6 +467,7 @@ The ``cursor`` class :param table: name of the table to copy data into. :param sep: columns separator expected in the file. Defaults to a tab. :param null: textual representation of :sql:`NULL` in the file. + The default is the two character string ``\N``. :param size: size of the buffer used to read from the file. :param columns: iterable with name of the columns to import. The length and types should match the content of the file to read. @@ -489,7 +490,7 @@ The ``cursor`` class are encoded in the connection `~connection.encoding` when sent to the backend. - .. method:: copy_to(file, table, sep='\\t', null='\\N', columns=None) + .. method:: copy_to(file, table, sep='\\t', null='\\\\N', columns=None) Write the content of the table named *table* *to* the file-like object *file*. See :ref:`copy` for an overview. @@ -499,6 +500,7 @@ The ``cursor`` class :param table: name of the table to copy data from. :param sep: columns separator expected in the file. Defaults to a tab. :param null: textual representation of :sql:`NULL` in the file. + The default is the two character string ``\N``. :param columns: iterable with name of the columns to export. If not specified, export all the columns.