diff options
author | Federico Di Gregorio <fog@initd.org> | 2005-10-25 16:00:49 +0000 |
---|---|---|
committer | Federico Di Gregorio <fog@initd.org> | 2005-10-25 16:00:49 +0000 |
commit | 0a73b75c5189f168a64e2583b30349f0978d113e (patch) | |
tree | 5320dc092d9ec3e439bacfbeac5cb8bb033f705b | |
parent | ed23aeb37ca705c398078d5a40c1cddd7524811a (diff) | |
download | psycopg2-0a73b75c5189f168a64e2583b30349f0978d113e.tar.gz |
SUSE addition to setup.cfg.
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | sandbox/named.py | 8 | ||||
-rw-r--r-- | setup.cfg | 4 |
4 files changed, 12 insertions, 5 deletions
@@ -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> * psycopg/cursor_type.c: added support for named cursors: @@ -3,7 +3,6 @@ What's new in psycopg 2.0 beta 6 * Support for named cursors (see examples/fetch.py). - What's new in psycopg 2.0 beta 5 -------------------------------- diff --git a/sandbox/named.py b/sandbox/named.py index d21a0cf..6a10760 100644 --- a/sandbox/named.py +++ b/sandbox/named.py @@ -3,8 +3,8 @@ import psycopg2.extensions class Portal(psycopg2.extensions.cursor): def __init__(self, name, curs): - name = '"'+name+'"' - psycopg2.extensions.cursor.__init__(self, curs.connection, name) + psycopg2.extensions.cursor.__init__( + self, curs.connection, '"'+name+'"') CURSOR = psycopg2.extensions.new_type((1790,), "CURSOR", Portal) psycopg2.extensions.register_type(CURSOR) @@ -13,9 +13,11 @@ conn = psycopg2.connect("dbname=test") curs = conn.cursor() curs.execute("SELECT reffunc2()") + portal = curs.fetchone()[0] print portal.fetchone() -portal.scroll(-1) +print portal.fetchmany(2) +portal.scroll(0, 'absolute') print portal.fetchall() @@ -10,8 +10,10 @@ use_pydatetime=1 # 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: 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 +# 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 # path like /usr/lib), just add the right path in "library_dir" any extra |