summaryrefslogtreecommitdiff
path: root/psycopg/cursor_int.c
Commit message (Collapse)AuthorAgeFilesLines
* Copyright year updated to 2021Daniele Varrazzo2021-06-151-1/+1
| | | | | ag -l Copyright | xargs sed -i \ "s/\(.*copyright (C) [0-9]\+\)\(-[0-9]\+\)\?\(.*Psycopg Team.*\)/\1-$(date +%Y)\3/I"
* Copyright bumped to 2020Daniele Varrazzo2020-01-171-0/+1
|
* Several function names shortenedDaniele Varrazzo2019-03-171-1/+1
| | | | | | There's not so much need for a strict convention for static functions. Leaving some 'psyco_' prefix when the internal function and the python-exposed function clashed.
* Added helper methods to set a result into a connection/cursorDaniele Varrazzo2019-03-171-0/+8
|
* Copyright year updatedDaniele Varrazzo2019-02-171-1/+1
| | | | | ag -l Copyright | xargs sed -i \ "s/\(.*copyright (C) [0-9]\+\)\(-[0-9]\+\)\?\(.*\)/\1-$(date +%Y)\3/I"
* Accept Composable in start_replication_expert()Daniele Varrazzo2017-06-171-0/+80
| | | | Close #554
* Better use of Py_CLEAR and implicit zeroed-out structuresDaniele Varrazzo2013-03-201-10/+2
|
* 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
|
* Merge branch 'python2' into python3Daniele Varrazzo2011-01-021-0/+35
|\ | | | | | | | | | | Conflicts: NEWS-2.3 setup.py
| * Added cursor.cast() methodDaniele Varrazzo2011-01-011-0/+35
| | | | | | | | | | The method exposes the typecasters lookup algorithm. Useful to create recursive typecasters.
* | Internal imports simplified.Daniele Varrazzo2010-12-121-5/+4
|/ | | | | | | | | | .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 curs_get_last_result function.Daniele Varrazzo2010-04-231-42/+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-76/+0
|
* Handle errors in asynchronous queries.Jan Urbański2010-04-201-4/+6
| | | | | | | | 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.
* Set the execution status to ASYNC_READ after flushing all output.Jan Urbański2010-04-141-0/+6
| | | | | | | | Without this a query that did not get flushed completely to the server would cause cursor.poll() to always go into the curs_poll_send() branch even if it was retuning ASYNC_READ. Bug report by Daniele Varrazzo.
* NOTIFYs fix and poll status changesFederico Di Gregorio2010-04-051-3/+10
| | | | | | 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-7/+31
| | | | | | | | | 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.
* Ref the async cursor before storing it in the connectionJan Urbański2010-04-051-0/+1
|
* Change the API for asynchronous queries to use cursor.poll()Jan Urbański2010-04-051-0/+53
| | | | | | | | | 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/+25
|
* Changes license to LGPL3 + OpenSSL exception on all source filesFederico Di Gregorio2010-02-121-12/+16
|
* * psycopg/cursor_type.c (cursor_setup): incref before settingJames Henstridge2008-05-281-2/+6
| | | | | | | attributes, to make things GC-safe. * psycopg/cursor_int.c (curs_reset): make clearing of description and casts attributes GC-safe.
* Fixed both Python 2.5 and 64 bit problems.Federico Di Gregorio2007-04-101-0/+1
|
* Initial psycopg 2 import after SVN crash.Federico Di Gregorio2004-10-191-0/+47