mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-26 10:53:44 +03:00
Note in the docs that now the table and fields names are escaped.
This commit is contained in:
parent
7749898a94
commit
47b93efcf8
|
@ -562,13 +562,6 @@ The ``cursor`` class
|
||||||
>>> cur.fetchall()
|
>>> cur.fetchall()
|
||||||
[(6, 42, 'foo'), (7, 74, 'bar')]
|
[(6, 42, 'foo'), (7, 74, 'bar')]
|
||||||
|
|
||||||
.. note:: the name of the table is not quoted: if the table name
|
|
||||||
contains uppercase letters or special characters it must be quoted
|
|
||||||
with double quotes::
|
|
||||||
|
|
||||||
cur.copy_from(f, '"TABLE"')
|
|
||||||
|
|
||||||
|
|
||||||
.. versionchanged:: 2.0.6
|
.. versionchanged:: 2.0.6
|
||||||
added the *columns* parameter.
|
added the *columns* parameter.
|
||||||
|
|
||||||
|
@ -577,6 +570,11 @@ The ``cursor`` class
|
||||||
are encoded in the connection `~connection.encoding` when sent to
|
are encoded in the connection `~connection.encoding` when sent to
|
||||||
the backend.
|
the backend.
|
||||||
|
|
||||||
|
.. versionchanged:: 2.9
|
||||||
|
the table and fields names are now quoted. If you need to specify
|
||||||
|
a schema-qualified table please use `copy_expert()`.
|
||||||
|
|
||||||
|
|
||||||
.. 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
|
Write the content of the table named *table* *to* the file-like
|
||||||
|
@ -598,12 +596,6 @@ The ``cursor`` class
|
||||||
2|\N|dada
|
2|\N|dada
|
||||||
...
|
...
|
||||||
|
|
||||||
.. note:: the name of the table is not quoted: if the table name
|
|
||||||
contains uppercase letters or special characters it must be quoted
|
|
||||||
with double quotes::
|
|
||||||
|
|
||||||
cur.copy_to(f, '"TABLE"')
|
|
||||||
|
|
||||||
.. versionchanged:: 2.0.6
|
.. versionchanged:: 2.0.6
|
||||||
added the *columns* parameter.
|
added the *columns* parameter.
|
||||||
|
|
||||||
|
@ -612,6 +604,10 @@ The ``cursor`` class
|
||||||
are decoded in the connection `~connection.encoding` when read
|
are decoded in the connection `~connection.encoding` when read
|
||||||
from the backend.
|
from the backend.
|
||||||
|
|
||||||
|
.. versionchanged:: 2.9
|
||||||
|
the table and fields names are now quoted. If you need to specify
|
||||||
|
a schema-qualified table please use `copy_expert()`.
|
||||||
|
|
||||||
|
|
||||||
.. method:: copy_expert(sql, file, size=8192)
|
.. method:: copy_expert(sql, file, size=8192)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user