Alexander Schrijver
03824a1dba
Throw an exception when a NUL character is used as a parameter.
2016-07-18 22:56:55 +02:00
Oleksandr Shulgin
a4cbb088fe
Add connection.get_dsn_parameters()
2015-10-30 11:10:41 +01:00
Oleksandr Shulgin
9295bce154
Add psycopg2.extensions.quote_ident.
2015-10-14 17:00:25 +02:00
Daniele Varrazzo
73d17e3c5e
Dropped PG_VERSION_HEX constant
...
At PostgreSQL 10.0 it would have become awkward.
2015-06-02 10:54:08 +01:00
Daniele Varrazzo
6bc4b23af5
Static-type psycopg_escape_string connection parameter
2013-04-05 00:07:36 +01:00
Daniele Varrazzo
7a5a226b49
Set a memory exception in psycopg_escape_string
...
...otherwise all the callers should set it.
2013-04-04 22:48:53 +01:00
Daniele Varrazzo
7177f815a6
Store a PGresult in the Exception error
...
This makes the Diagnostics independent from further operations on the cursor
and allows using it with exceptions not generated by a cursor.
2013-03-19 23:42:54 +00:00
Daniele Varrazzo
5bfb6cdefe
Use more compact macros to annotate functions for the static checker
2012-03-01 02:53:28 +00:00
Daniele Varrazzo
f2e4a8ed78
Functions setting exception return a negative value on error
...
This works around another shortcoming of the static checker; also to be
discussed with the author.
2012-03-01 02:53:28 +00:00
Daniele Varrazzo
a6df55f4e3
Flag the psycopg_ensure_*() functions as stealing a ref
2012-02-24 10:41:02 +00:00
Daniele Varrazzo
1db9c9b8ce
The cursor name can be a non-valid PostgreSQL identifier
2011-02-23 01:53:25 +00:00
Daniele Varrazzo
b544354db2
COPY sends unicode to a file if it derives from io.TextIoBase
...
Fixes ticket #36 .
2011-02-05 15:12:37 +01:00
Daniele Varrazzo
f6fefbea64
Function psycopg_ensure_bytes converted in a "filter" stealing a ref.
2010-12-31 03:18:27 +01:00
Daniele Varrazzo
2e22eef727
Added utility function to convert bytes to string in Python 3.
2010-12-31 03:18:27 +01:00
Daniele Varrazzo
b4685bba4a
Added utility function to get bytes from a str/unicode.
2010-12-31 03:18:26 +01:00
Daniele Varrazzo
ae06fb03e7
Added psycopg_strdup utility function.
2010-12-21 04:02:14 +00:00
Daniele Varrazzo
6d7916cfe1
Internal imports simplified.
...
.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.
2010-12-12 13:39:32 +00:00
Daniele Varrazzo
9fa1eac2b4
Dropped unused include file.
2010-12-12 13:39:32 +00:00
Daniele Varrazzo
67793ed989
Compiler warning dropped.
2010-11-18 23:13:16 +00:00
Daniele Varrazzo
6e71b3db05
Dropped PSYCOPG_OWN_QUOTING.
...
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!
2010-10-08 12:27:47 +01:00
Federico Di Gregorio
611606d532
Changes license to LGPL3 + OpenSSL exception on all source files
2010-02-12 23:34:53 +01:00
James Henstridge
9067bde803
* psycopg/utils.c (psycopg_escape_string): same here.
...
* 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.
2009-02-17 16:00:52 +09:00
Federico Di Gregorio
4eb295a8ca
Patch from Jason Erickson to build on MSVC
2008-11-26 09:51:53 +01:00
Federico Di Gregorio
5c982d90f0
Unified string quoting
2008-11-25 19:18:17 +01:00
Federico Di Gregorio
4e359f6f05
Applied COPY patch from Alejandro Dubrovsky (missing files and project)
2008-11-25 17:46:15 +01:00