mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-07-10 08:12:26 +03:00
SUSE addition to setup.cfg.
This commit is contained in:
parent
ed23aeb37c
commit
0a73b75c51
|
@ -1,3 +1,7 @@
|
||||||
|
2005-10-26 Federico Di Gregorio <fog@initd.org>
|
||||||
|
|
||||||
|
* setup.cfg: added include_dirs line for SUSE 9.3.
|
||||||
|
|
||||||
2005-10-22 Federico Di Gregorio <fog@initd.org>
|
2005-10-22 Federico Di Gregorio <fog@initd.org>
|
||||||
|
|
||||||
* psycopg/cursor_type.c: added support for named cursors:
|
* psycopg/cursor_type.c: added support for named cursors:
|
||||||
|
|
1
NEWS
1
NEWS
|
@ -3,7 +3,6 @@ What's new in psycopg 2.0 beta 6
|
||||||
|
|
||||||
* Support for named cursors (see examples/fetch.py).
|
* Support for named cursors (see examples/fetch.py).
|
||||||
|
|
||||||
|
|
||||||
What's new in psycopg 2.0 beta 5
|
What's new in psycopg 2.0 beta 5
|
||||||
--------------------------------
|
--------------------------------
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,8 @@ import psycopg2.extensions
|
||||||
|
|
||||||
class Portal(psycopg2.extensions.cursor):
|
class Portal(psycopg2.extensions.cursor):
|
||||||
def __init__(self, name, curs):
|
def __init__(self, name, curs):
|
||||||
name = '"'+name+'"'
|
psycopg2.extensions.cursor.__init__(
|
||||||
psycopg2.extensions.cursor.__init__(self, curs.connection, name)
|
self, curs.connection, '"'+name+'"')
|
||||||
|
|
||||||
CURSOR = psycopg2.extensions.new_type((1790,), "CURSOR", Portal)
|
CURSOR = psycopg2.extensions.new_type((1790,), "CURSOR", Portal)
|
||||||
psycopg2.extensions.register_type(CURSOR)
|
psycopg2.extensions.register_type(CURSOR)
|
||||||
|
@ -13,9 +13,11 @@ conn = psycopg2.connect("dbname=test")
|
||||||
|
|
||||||
curs = conn.cursor()
|
curs = conn.cursor()
|
||||||
curs.execute("SELECT reffunc2()")
|
curs.execute("SELECT reffunc2()")
|
||||||
|
|
||||||
portal = curs.fetchone()[0]
|
portal = curs.fetchone()[0]
|
||||||
print portal.fetchone()
|
print portal.fetchone()
|
||||||
portal.scroll(-1)
|
print portal.fetchmany(2)
|
||||||
|
portal.scroll(0, 'absolute')
|
||||||
print portal.fetchall()
|
print portal.fetchall()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,10 @@ use_pydatetime=1
|
||||||
# but some extra checks on sys.platform will still be done in setup.py.
|
# but some extra checks on sys.platform will still be done in setup.py.
|
||||||
# The next line is the default as used on psycopg author Debian laptop:
|
# The next line is the default as used on psycopg author Debian laptop:
|
||||||
include_dirs=.:/usr/include/postgresql:/usr/include/postgresql/server
|
include_dirs=.:/usr/include/postgresql:/usr/include/postgresql/server
|
||||||
# Uncomment next line on Mandrake 10.x (and comment previous one):
|
# Uncomment next line on Mandrake 10.x (and comment previous ones):
|
||||||
#include_dirs=.:/usr/include/pgsql/8.0:/usr/include/pgsql/8.0/server
|
#include_dirs=.:/usr/include/pgsql/8.0:/usr/include/pgsql/8.0/server
|
||||||
|
# Uncomment next line on SUSE 9.3 (and comment previous ones):
|
||||||
|
#include_dirs=.:/usr/include/pgsql:/usr/include/pgsql/server
|
||||||
|
|
||||||
# If postgresql is installed somewhere weird (i.e., not in your runtime library
|
# If postgresql is installed somewhere weird (i.e., not in your runtime library
|
||||||
# path like /usr/lib), just add the right path in "library_dir" any extra
|
# path like /usr/lib), just add the right path in "library_dir" any extra
|
||||||
|
|
Loading…
Reference in New Issue
Block a user