summaryrefslogtreecommitdiff
path: root/psycopg/utils.c
Commit message (Collapse)AuthorAgeFilesLines
* More straightforward semantics for psyco_GetDecimalTypeDaniele Varrazzo2019-01-211-6/+3
| | | | Raise an exception when returning NULL, leave the caller cleaning it.
* Mark psyco_set_error as returning a borrowed objectDaniele Varrazzo2019-01-211-2/+1
|
* Added utils.h fileDaniele Varrazzo2019-01-211-0/+113
| | | | | | utils.c functions definition moved out of psycopg.h Some utility functions defined into psycopgmodule.c moved into utils.c.
* psycopg_escape_string: don't make me cringeDaniele Varrazzo2019-01-211-8/+8
| | | | Just reformatted.
* Allow strings subclasses in ensure_bytesfix-679Daniele Varrazzo2018-02-211-2/+2
| | | | Fix #679
* Fix typo in comment in utils.cRonan Amicel2017-12-141-1/+1
|
* Obscure the password on url dsn tooDaniele Varrazzo2017-03-161-0/+24
| | | | | | Note that we don't leak anymore the password length. Fix #528
* Don't look up for Python encodingDaniele Varrazzo2016-12-291-0/+54
| | | | | | 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-6/+8
| | | | 0 is a valid length, isn't it?
* Merge branch 'master' into named-callprocDaniele Varrazzo2016-12-261-44/+12
|\
| * Dropped internal escape identifier functionDaniele Varrazzo2016-12-261-22/+18
| | | | | | | | Using libpq one as now it's guaranteed to be present.
* | Merge branch 'master' into named-callprocDaniele Varrazzo2016-12-261-3/+35
|\ \ | |/
| * Dropped ifdef guards against obsolete libpq versionsDaniele Varrazzo2016-08-151-2/+0
| | | | | | | | | | One of them was actually wrong: lobject_type.c wouldn't have compiled pre 8.3 (broken in 6e841a41, 2 years ago).
| * Throw an exception when a NUL character is used as a parameter.Alexander Schrijver2016-07-181-1/+6
| |
| * Add connection.get_dsn_parameters()Oleksandr Shulgin2015-10-301-0/+29
| |
* | Return input tuple in cur.callproc, factor code to use PQescapeIdentifier in ↵mrmilosz2015-12-131-2/+31
|/ | | | single place
* Add psycopg2.extensions.quote_ident.Oleksandr Shulgin2015-10-141-2/+2
|
* Dropped PG_VERSION_HEX constantDaniele Varrazzo2015-06-021-1/+1
| | | | At PostgreSQL 10.0 it would have become awkward.
* Static-type psycopg_escape_string connection parameterDaniele Varrazzo2013-04-051-2/+1
|
* Set a memory exception in psycopg_escape_stringDaniele Varrazzo2013-04-041-8/+25
| | | | ...otherwise all the callers should set it.
* Store a PGresult in the Exception errorDaniele Varrazzo2013-03-191-0/+6
| | | | | This makes the Diagnostics independent from further operations on the cursor and allows using it with exceptions not generated by a cursor.
* Use more compact macros to annotate functions for the static checkerDaniele Varrazzo2012-03-011-6/+3
|
* Functions setting exception return a negative value on errorDaniele Varrazzo2012-03-011-9/+9
| | | | | This works around another shortcoming of the static checker; also to be discussed with the author.
* Flag the psycopg_ensure_*() functions as stealing a refDaniele Varrazzo2012-02-241-0/+2
|
* The cursor name can be a non-valid PostgreSQL identifierDaniele Varrazzo2011-02-231-0/+37
|
* COPY sends unicode to a file if it derives from io.TextIoBaseDaniele Varrazzo2011-02-051-0/+40
| | | | Fixes ticket #36.
* Function psycopg_ensure_bytes converted in a "filter" stealing a ref.Daniele Varrazzo2010-12-311-4/+11
|
* Added utility function to convert bytes to string in Python 3.Daniele Varrazzo2010-12-311-0/+24
|
* Added utility function to get bytes from a str/unicode.Daniele Varrazzo2010-12-311-0/+26
|
* Added psycopg_strdup utility function.Daniele Varrazzo2010-12-211-0/+22
|
* Internal imports simplified.Daniele Varrazzo2010-12-121-4/+3
| | | | | | | | | | .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 unused include file.Daniele Varrazzo2010-12-121-1/+0
|
* Compiler warning dropped.Daniele Varrazzo2010-11-181-0/+1
|
* Dropped PSYCOPG_OWN_QUOTING.Daniele Varrazzo2010-10-081-32/+0
| | | | | | | | It was deprecated for version 2.1. There are bugs to be fixed made more complex by its presence and it doesn't keep into account PostgreSQL 9.0 new binary format. Time to go!
* Changes license to LGPL3 + OpenSSL exception on all source filesFederico Di Gregorio2010-02-121-0/+21
|
* * psycopg/utils.c (psycopg_escape_string): same here.James Henstridge2009-02-171-3/+1
| | | | | | | | | * psycopg/adapter_binary.c (binary_escape): simplify PostgreSQL version check. * setup.py (psycopg_build_ext.finalize_options): use a single define of the PostgreSQL version in a form that can easily be used by #ifdefs.
* Patch from Jason Erickson to build on MSVCFederico Di Gregorio2008-11-261-1/+3
|
* Unified string quotingFederico Di Gregorio2008-11-251-23/+64
|
* Applied COPY patch from Alejandro Dubrovsky (missing files and project)Federico Di Gregorio2008-11-251-0/+43