summaryrefslogtreecommitdiff
path: root/psycopg/adapter_qstring.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
|
* Prefix 'psycopg_' changed to 'psyco_'namingDaniele Varrazzo2019-03-171-4/+4
|
* 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"
* Stricter use of PyArg_ParseTuple typed objectsDaniele Varrazzo2019-01-211-2/+2
| | | | The function expect PyObject *, not subclasses.
* Dropped compiler warning about signed/unsigned comparisonsDaniele Varrazzo2017-02-081-1/+1
|
* Don't look up for Python encodingDaniele Varrazzo2016-12-291-27/+12
| | | | | | Store the encode/decode functions for the right codec in the connection. The Python encoding name has been dropped of the connection to avoid the temptation to use it...
* Use -1 instead of 0 to say "calculate the length" in many funcsDaniele Varrazzo2016-12-271-1/+1
| | | | 0 is a valid length, isn't it?
* conn->codec rename to pyencDaniele Varrazzo2016-12-261-1/+1
|
* Allow adapting bytes using QuotedString on Python 3 tooDaniele Varrazzo2016-07-011-4/+2
| | | | Close #365.
* Test moved to the right module, cleanup, but same problemDaniele Varrazzo2016-07-011-2/+1
|
* Work in progress on writable encodingDaniele Varrazzo2016-07-011-18/+53
| | | | | | | | | | | | | | | | Would help using adapt(unicode) to quote strings without a connection, see ticket #331. Currently in heisenbug state: if test_connection_wins_anyway and test_encoding_default run (in this order), the latter fail because the returned value is "'\xe8 '", with an extra space. Skipping the first test, the second succeed. The bad value is returned by the libpq: ql = PQescapeString(to+eq+1, from, len); just returns len = 2 and an extra space in the string... meh.
* Dropped simple type wrapper functionsDaniele Varrazzo2014-08-151-14/+0
| | | | | These functions don't need to exist: exposing the type in the module is enough. It is actually better as one may use isinstance and such.
* Dropped almost-no-op customized objects repr()Daniele Varrazzo2014-08-151-7/+1
| | | | | | | | The default repr is enough: it prints <TypeName at 0xADDR> instead of <TypeName object at 0xADDR>. The only people being hurt by this change are the ones using doctests: they deserve it.
* Name the types after the module they are exposed fromDaniele Varrazzo2014-08-151-3/+3
|
* Use the Py_RETURN_NONE macroDaniele Varrazzo2013-04-051-2/+1
|
* Dropped GC support for several objectsDaniele Varrazzo2013-04-051-13/+2
| | | | | | Non-containers don't need GC. It was half-baked anyway as the tp_clear was often not set. Dropped tp_traverse too for these objects as unused.
* Static-type psycopg_escape_string connection parameterDaniele Varrazzo2013-04-051-1/+1
|
* Avoid encoding strdup in qstring adapterDaniele Varrazzo2013-04-051-46/+52
| | | | | | Dropped encoding parameter in the constructor: it is used nowhere and not documented. Use directly the connection encoding if available, else the previous latin1 fallback.
* Set a memory exception in psycopg_escape_stringDaniele Varrazzo2013-04-041-1/+0
| | | | ...otherwise all the callers should set it.
* PyType_GenericAlloc is the default allocator: no need to specifyDaniele Varrazzo2013-03-201-1/+1
|
* Dropped "customized" pg_free functionsDaniele Varrazzo2013-03-201-27/+1
| | | | The defaut is already to call PyObject_GC_Del.
* Dropped GIL release around function calling PyMem_MallocDaniele Varrazzo2012-05-221-10/+1
| | | | Closes ticket #110.
* Proper type check in prepare() methods for list, binary, qstringDaniele Varrazzo2012-03-041-8/+6
|
* Further modeling of exception raisingDaniele Varrazzo2012-03-041-1/+1
|
* Fixed adaptation in several adapters.Daniele Varrazzo2010-12-311-3/+3
| | | | | The getquoted methods always return bytes. The str() convert this representation to string on the fly.
* Redefining the microprotocol on Py3 as returning bytes.Daniele Varrazzo2010-12-311-3/+2
|
* The library can be compiled with Python 3.Daniele Varrazzo2010-12-211-2/+5
| | | | | | | | | Just compiled! No test run yet and many points to review, marked in the code. The patch is largely Martin von Löwis work, simplified after refactoring in the previous commits and adapted to the new code (as the patch was originally for Psycopg 2.0.9)
* Added Python codec name to the connection.Daniele Varrazzo2010-12-211-18/+5
| | | | | This allows dropping repeated dictionary lookups with unicode query/parameters.
* Import structmember/stringobject headers from python.h.Daniele Varrazzo2010-12-211-2/+0
| | | | stringobject is not to be imported with Python 3.
* Using PyVarObject_HEAD_INIT macro.Daniele Varrazzo2010-12-211-2/+1
|
* Using Py_TYPE and Py_REFCNT macros.Daniele Varrazzo2010-12-211-4/+4
|
* Changed Python const RO -> READONLY.Daniele Varrazzo2010-12-121-3/+3
|
* Internal imports simplified.Daniele Varrazzo2010-12-121-10/+5
| | | | | | | | | | .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 PyArg_ParseTuple() calls in functions taking no arguments.Daniele Varrazzo2010-11-091-2/+1
|
* Changes license to LGPL3 + OpenSSL exception on all source filesFederico Di Gregorio2010-02-121-12/+16
|
* Unified string quotingFederico Di Gregorio2008-11-251-78/+17
|
* Applied COPY patch from Alejandro DubrovskyFederico Di Gregorio2008-11-251-2/+2
|
* Merge from jhFederico Di Gregorio2008-07-261-9/+20
|\
| * Use Py_CLEAR() in a few more places, and do INCREF's before setting James Henstridge2008-07-211-6/+6
| | | | | | | | struct members rather than afterwards.
| * * psycopg/adapter_qstring.c (qstring_traverse): add cyclic GCJames Henstridge2008-07-181-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | traversal for quoted string adapters. * psycopg/adapter_pboolean.c (pboolean_traverse): add cyclic GC traversal for boolean adapters. * psycopg/adapter_mxdatetime.c (mxdatetime_traverse): add cyclic GC traversal for mxdatetime adapters. * psycopg/adapter_datetime.c (pydatetime_traverse): add cyclic GC traversal for datetime adapters.
* | get_backend_pid() patch and fixesFederico Di Gregorio2008-07-261-5/+2
|/
* Add more const qualifiers.James Henstridge2008-01-211-4/+4
|
* * psycopg/typecast_array.c (typecast_array_scan): set an initialJames Henstridge2008-01-131-3/+3
| | | | | | value for quotes to keep gcc happy. * psycopg/*.c: add missing static modifier on many functions.
* Use escape string syntax for string escape if connected to a server Daniele Varrazzo2007-11-111-4/+9
| | | | | | | | | | | requiring it. Added a connection flag to store whether E''-style quoting is required: this avoids repeated PQparameterStatus() calls. Added a test case to verify correct behavior on strings, unicode and binary data. Tested with PG versions from 7.4 to 8.3b2, with any server 'standard_conforming_strings' setting and with 'PSYCOPG_OWN_QUOTING' too.
* int->size_t transition.Federico Di Gregorio2007-04-131-5/+20
|
* Fixed both Python 2.5 and 64 bit problems.Federico Di Gregorio2007-04-101-28/+35
|
* Encoding fixes.Federico Di Gregorio2007-01-161-2/+4
|
* Piet Delport patches: 2 of 3.Federico Di Gregorio2006-09-231-1/+1
|
* Fixed segfault in Binary/QString.Federico Di Gregorio2006-06-181-7/+5
|