summaryrefslogtreecommitdiff
path: root/psycopg/cursor.h
Commit message (Collapse)AuthorAgeFilesLines
* Accept Composable in start_replication_expert()Daniele Varrazzo2017-06-171-0/+1
| | | | Close #554
* Dropped internal escape identifier functionDaniele Varrazzo2016-12-261-0/+1
| | | | Using libpq one as now it's guaranteed to be present.
* Don't segfault on uninitialized cursorDaniele Varrazzo2014-02-261-3/+6
| | | | | | | It can happen with bad cursor subclasses not calling super's init. Raise an exception instead of segfaulting. Closes #195
* Use the do-while 0 idiom for cursor guards macroDaniele Varrazzo2014-02-261-18/+29
|
* Added support with cursors without scroll clauseDaniele Varrazzo2012-08-151-2/+8
| | | | | Using nothing is different from NO SCROLL, see DECLARE notes in PG docs.
* Added scrollable cursor implementationDaniele Varrazzo2012-08-151-0/+1
| | | | Patch provided by Jon Nelson (ticket #108).
* Use more compact macros to annotate functions for the static checkerDaniele Varrazzo2012-03-011-2/+1
|
* Flag a few other functions returning borrowed refsDaniele Varrazzo2012-02-241-0/+1
|
* First try at curs.withhold implementationFederico Di Gregorio2011-07-051-1/+2
|
* Fixed default size for read copy bufferDaniele Varrazzo2011-06-071-1/+1
| | | | The original commit stated it should have been 8192.
* Stricter declaration and correct use of psyco_set_errorDaniele Varrazzo2011-02-211-2/+4
| | | | | | | | | | It has long been used in wrong ways, with the function receiving a connection or lobject instead of a cursor. It has always been unnoticed (nobody has noticed the wrong object attached to the exception in the wrong cases) but it started crashing the interpreter with Python 3.2 on Windows. Thanks to Jason Erickson for finding the problem and helping fixing it.
* Added cursor.itersizeDaniele Varrazzo2011-02-171-0/+1
| | | | | | | The value is used to control the number of records to fetch per network roundtrip in named cursors iteration. Used to avoid the inefficient arraysize default of 1 without giving this value the magic meaning of 2000.
* Merge branch 'python2' into python3Daniele Varrazzo2011-01-031-0/+2
|\ | | | | | | | | | | | | | | Conflicts: NEWS-2.3 psycopg/connection_type.c tests/test_connection.py tests/types_basic.py
| * The cursor is weakly referenceableDaniele Varrazzo2011-01-031-0/+2
| |
* | Merge branch 'python2' into python3Daniele Varrazzo2011-01-021-0/+1
|\ \ | |/ | | | | | | | | Conflicts: NEWS-2.3 setup.py
| * Added cursor.cast() methodDaniele Varrazzo2011-01-011-0/+1
| | | | | | | | | | The method exposes the typecasters lookup algorithm. Useful to create recursive typecasters.
* | Internal imports simplified.Daniele Varrazzo2010-12-121-5/+0
|/ | | | | | | | | | .c files only need to import psycopg.h: it will in turn import dependencies from Python and libpq and configure.h. psycopg.h should be the first to be imported, so the basic imports are not required in the .h's As a guideline I'm trying to import from the most specific to the most generic to detect missing imports in the .h's.
* Dropped large object support when psycopg is in green mode.Daniele Varrazzo2010-05-091-6/+0
| | | | | Async mode and large object are not compatible, albeit I haven't found an authoritative source yet.
* Dropped curs_get_last_result function.Daniele Varrazzo2010-04-231-1/+0
| | | | | | The result is read from a pqpath function and put on the async_cursor by a function that also checks for is presence and dismiss it after its usage.
* Functions to poll in ready state moved on the connection.Daniele Varrazzo2010-04-231-2/+0
|
* Forbid COPY-related methods in green mode.Daniele Varrazzo2010-04-211-0/+6
| | | | | | | | | With the current implementation, at best they would silently block. They actually hang everything. Implementation posponed after some refactoring of the polling system, because it will be probably possible to provide an implementation for 'poll()' during COPY which is good for both async and green modes.
* Handle errors in asynchronous queries.Jan Urbański2010-04-201-1/+0
| | | | | | | | Do it by keeping the reference to the last PGresult in the cursor and calling pq_fetch() before ending the asynchronous execution. This takes care of handling the possible error state of the PGresult and also allows the removal of the needsfetch flag, since now after execution ends the results are already fetched and parsed.
* NOTIFYs fix and poll status changesFederico Di Gregorio2010-04-051-3/+3
| | | | | | POLL_OK has been changed from 3 to 0 to let the user specify a short loop just as "if not curs.poll()" instead of having to check for write and read separately. For an example of this, see examples/notify.py.
* Avoid the possibility when curs_get_last_result would blockJan Urbański2010-04-051-1/+1
| | | | | | | | | It was trying to get all pending results from the connection and if the client sent many and anyone except the first one would not be immediately available the loop in curs_get_last_result would call PQgetResult blockingly. Avoid that by calling PQisBusy every time and telling the client to wait for more data if it returns 1.
* Make some methods raise an exception in asynchronous modeJan Urbański2010-04-051-0/+11
| | | | | | | The methods changed are connection.commit(), rollback(), reset(), set_isolation_level(), set_client_encoding(), lobject(), cursor(str) as well as cursor.execute() and cursor.callproc() if another query is in progress and cursor.executemany(), cursor.copy_{from,to,expert)().
* Change the API for asynchronous queries to use cursor.poll()Jan Urbański2010-04-051-0/+2
| | | | | | | | | The isread() API was not safe, because the query might have not been sent fully to the server after calling execute(). To make the async API complete, a similar mechanism to async connections must be used. The cursor now has a poll() method that you would use identically to the poll() method of the connection class.
* Add curs_get_last_result, a function to get the last result from a connectionJan Urbański2010-04-051-0/+1
|
* Changes license to LGPL3 + OpenSSL exception on all source filesFederico Di Gregorio2010-02-121-12/+16
|
* Fixed problem with lots of columns in COPY operationsFederico Di Gregorio2009-08-091-1/+1
|
* * psycypg/*.h: apply HIDDEN to all global variables and functionsJames Henstridge2008-01-211-2/+3
| | | | | | | | that should not be exported from the module. This results in a 5% reduction in code size and shortens the dynamic symbol table. * psycopg/config.h: If GCC >= 4.0 is installed, define the HIDDEN symbol to apply the "hidden" visibility attribute.
* Various fixes, now all examples work.Federico Di Gregorio2007-04-131-0/+1
|
* Fixed both Python 2.5 and 64 bit problems.Federico Di Gregorio2007-04-101-10/+11
|
* Builds again on win32 (closes: #132).Federico Di Gregorio2006-10-291-1/+1
|
* Piet Delport patches: 1 of 3.Federico Di Gregorio2006-09-231-1/+1
|
* Implemented named cursors.Federico Di Gregorio2005-10-221-2/+11
|
* NOTIFY works again.Federico Di Gregorio2005-10-181-0/+4
|
* Array support works, at least for INTEGERS.Federico Di Gregorio2005-03-221-0/+1
|
* isready/prefetch fix.Federico Di Gregorio2004-12-141-0/+1
|
* async fixes and better connection/cursor management.Federico Di Gregorio2004-12-101-3/+4
|
* Initial psycopg 2 import after SVN crash.Federico Di Gregorio2004-10-191-0/+87