mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-22 17:06:33 +03:00
Drop table moved off the example.
This commit is contained in:
parent
f134bceb00
commit
a1fa06e6d8
|
@ -8,6 +8,8 @@ The ``connection`` class
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
import psycopg2.extensions
|
import psycopg2.extensions
|
||||||
|
|
||||||
|
drop_test_table('foo')
|
||||||
|
|
||||||
.. class:: connection
|
.. class:: connection
|
||||||
|
|
||||||
Handles the connection to a PostgreSQL database instance. It encapsulates
|
Handles the connection to a PostgreSQL database instance. It encapsulates
|
||||||
|
@ -169,7 +171,6 @@ The ``connection`` class
|
||||||
>>> pprint(conn.notices)
|
>>> pprint(conn.notices)
|
||||||
['NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "foo_pkey" for table "foo"\n',
|
['NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "foo_pkey" for table "foo"\n',
|
||||||
'NOTICE: CREATE TABLE will create implicit sequence "foo_id_seq" for serial column "foo.id"\n']
|
'NOTICE: CREATE TABLE will create implicit sequence "foo_id_seq" for serial column "foo.id"\n']
|
||||||
>>> cur.execute("DROP TABLE foo;")
|
|
||||||
|
|
||||||
To avoid a leak in case excessive notices are generated, only the last
|
To avoid a leak in case excessive notices are generated, only the last
|
||||||
50 messages are kept.
|
50 messages are kept.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user