Commit Graph

1089 Commits

Author SHA1 Message Date
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
Federico Di Gregorio
c1d6073531 Applied COPY patch from Alejandro Dubrovsky 2008-11-25 17:45:22 +01:00
James Henstridge
cc2aa0a9ca * psycopg/psycopg.h (NotSupportedError_doc): clean up
spelling/grammar a bit, using exception description from the PEP.
2008-09-23 17:22:37 +08:00
Federico Di Gregorio
f6a25ccdf0 Build fix from Jorgen Austvik 2008-08-02 10:30:36 +02:00
Federico Di Gregorio
ceee4c816f Merge from jh 2008-07-26 15:10:02 +02:00
Federico Di Gregorio
e95a4d9d2e get_backend_pid() patch and fixes 2008-07-26 15:09:20 +02:00
James Henstridge
a2f3e4a3ac * psycopg/lobject_type.c (lobject_setup): use
FORMAT_CODE_PY_SSIZE_T in Dprintf() call for 64-bit compatibility
when using Python 2.5 or later.
(lobject_dealloc): same here.
2008-07-23 16:57:10 +08:00
James Henstridge
0aec2840d8 Merge support for cyclic GC in relevant types that psycopg defines. 2008-07-23 16:50:24 +08:00
James Henstridge
2273b79be9 Use Py_CLEAR() in a few more places, and do INCREF's before setting
struct members rather than afterwards.
2008-07-21 13:41:54 +08:00
James Henstridge
e0287c0db4 * psycopg/adapter_qstring.c (qstring_traverse): add cyclic GC
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.
2008-07-18 17:42:31 +08:00
James Henstridge
590542e973 * psycopg/adapter_binary.c (binary_traverse): add cyclic GC
traversal for binary adapters.
2008-07-01 11:59:25 +08:00
James Henstridge
47d2414e32 * psycopg/adapter_asis.c (asis_traverse): add cyclic GC traversal
for AsIs adapters.
2008-07-01 09:57:16 +08:00
James Henstridge
fd538a8b17 * psycopg/adapter_list.c (list_traverse): add cyclic GC traversal
for list adapters.
2008-07-01 09:34:51 +08:00
Federico Di Gregorio
e664abb248 Added XXXARRAY imports to psycopg2.extenions 2008-05-30 00:39:50 +02:00
James Henstridge
26693621ef * psycopg/cursor_type.c (cursor_setup): incref before setting
attributes, to make things GC-safe.

	* psycopg/cursor_int.c (curs_reset): make clearing of description
	and casts attributes GC-safe.
2008-05-28 17:45:37 +08:00
James Henstridge
bbd101bb7e * psycopg/typecast.c (typecast_traverse): implement cyclic GC
traversal for typecasters.
2008-05-28 17:22:40 +08:00
James Henstridge
a39fb19eb9 * psycopg/connection_type.c:
* psycopg/cursor_type.c: add support for cyclic GC.

	* psycopg/python.h: add definitions for Py_CLEAR() and Py_VISIT()
	for compatibility with old versions of Python.
2008-05-28 09:00:36 +08:00
Federico Di Gregorio
5a428642f8 COPY problem tests and partial fix 2008-05-27 17:40:19 +02:00
Federico Di Gregorio
6073193314 Fixed memory leak in executemany 2008-05-19 10:14:17 +02:00
James Henstridge
ee235478bd * psycopg/lobject.h (lobjectObject): remove "mode" struct member,
since it was unused.
2008-05-06 18:12:50 +08:00
James Henstridge
9d20f5c09c * psycopg/lobject_*.c: replace uses of the closed struct member,
and change the Python level attribute to a getset.

	* psycopg/lobject.h (lobjectObject): remove the closed member,
	since "fd < 0" gives us the same information.  Reorder the struct
	members for better packing.
2008-05-06 18:07:54 +08:00
James Henstridge
2046ae34fb * psycopg/lobject*: const'ify the code. 2008-05-06 17:09:43 +08:00
James Henstridge
7d66c20edb * tests/test_lobject.py (LargeObjectTests): add more tests,
including behaviour on closed lobjects and stale lobjects.

	* psycopg/lobject_type.c (psyco_lobj_close): don't mark the
	connection closed here because it is done by
	lobject_close_locked().

	* psycopg/lobject_int.c (lobject_open): mark objects as not closed
	if we successfully open them.
	(lobject_close_locked): mark the lobject closed here.
	(lobject_export): ensure we are in a transaction, since
	lo_export() issues multiple queries.

	* psycopg/lobject_type.c (lobject_setup): make lobjects start closed.
2008-05-06 17:04:26 +08:00
James Henstridge
e627948a6b * psycopg/lobject.h: don't export the lobjectType symbol. 2008-05-05 22:51:15 +08:00
Federico Di Gregorio
0319bc8cc4 Fixed build error on SUN 2008-05-05 15:55:51 +02:00
James Henstridge
9a48c261be Add basic tests for large object code. Fix lobject.seek() to actually
work.
2008-05-05 15:33:44 +08:00
James Henstridge
e192c603fa Fix up structmember definitions to match real types. T_LONG is not the
same as T_INT/T_UINT on AMD64 ...
2008-05-05 15:00:50 +08:00
James Henstridge
82557e65a2 Fix up pq_complete_error() calls. 2008-05-05 15:00:34 +08:00
James Henstridge
5beef38bfc Fix double free in case where PGresult is NULL. 2008-05-05 14:16:57 +08:00
James Henstridge
ec20fa8912 Some changes to the lobject code to match changes in pqpath.[ch]. 2008-05-05 12:07:24 +08:00
James Henstridge
3cfe438b74 Add an #endif I accidentally removed 2008-05-05 10:43:38 +08:00
James Henstridge
938c456cee Merge changes from psycopg2/trunk via psycopg2.r243. 2008-05-05 10:37:24 +08:00
Federico Di Gregorio
f3438f2961 Preparing release 2.0.7. 2008-04-14 04:27:22 +00:00
James Henstridge
23866bc35d * psycopg/connection_type.c (connection_dealloc): free
connection->encoding with free() instead of PyMem_Free().

	* psycopg/connection_int.c (conn_connect): use malloc() to
	allocate connection->encoding instead of PyMem_Malloc(), since it
	is freed in other places with free() and assigned to with
	strdup().
2008-03-30 22:15:21 +00:00
James Henstridge
e848585b90 * psycopg/typecast.c (typecast_from_c): fix up some reference
leaks.  This leak affected a bounded set of objects, so doesn't
	account for any gradual leaks.
2008-03-25 23:21:00 +00:00
James Henstridge
af1478feb9 * psycopg/connection_int.c (conn_notice_callback): don't leak
notice messages.
2008-03-19 01:01:26 +00:00
Federico Di Gregorio
8103f44a12 Fixed test segfault due to double decref. 2008-03-17 08:13:16 +00:00
James Henstridge
cceaa7331b * psycopg/typecast.c (typecast_parse_time): give the correct
return value for partially parsed time values.

	* psycopg/typecast_mxdatetime.c (typecast_MXDATE_cast): return
	NULL after setting DataError.  Also, don't treat it as an error if
	typecast_parse_time() returns 0 (as might happen if the remainder
	of the string is " BC").

	* psycopg/typecast_datetime.c (typecast_PYDATE_cast): return NULL
	after setting DataError.
	(typecast_PYDATETIME_cast): same here.
	(typecast_PYTIME_cast): same here.

	* tests/test_dates.py
	(CommonDatetimeTestsMixin.test_parse_incomplete_date): test that
	parsing incomplete date values results in DataError.
	(CommonDatetimeTestsMixin.test_parse_incomplete_time): same for
	times.
	(CommonDatetimeTestsMixin.test_parse_incomplete_time): same for
	datetimes.
2008-03-17 04:06:44 +00:00
James Henstridge
475df5ebd6 2008-03-07 Jason Erickson <jerickso@stickpeople.com>
* psycopg/pqpath.c (pq_raise): if PSYCOPG_EXTENSIONS is not
	defined, raise OperationalError rather than
	TransactionRollbackError for deadlock or serialisation errors for
	protocol versions less than 3.
2008-03-06 18:41:07 +00:00
James Henstridge
89cadcb553 2008-03-07 Jason Erickson <jerickso@stickpeople.com>
* psycopg/psycopgmodule.c (psyco_connect): fix off by one error in
	calculating the length of the DSN.
2008-03-06 16:15:41 +00:00
James Henstridge
e55e2683cf * psycopg/pqpath.c (_pq_fetch_tuples): Don't call Python APIs
without holding the GIL.
2008-03-06 15:12:40 +00:00
James Henstridge
b5f4a5f6c2 Fix off-by-one error in PyMem_Malloc() call in
psyco_conn_set_client_encoding().  Fixes #211
2008-02-13 16:01:10 +00:00
James Henstridge
6c2e3ab49b * Add HIDDEN attribute to datetime related global variables.
* Make const strings static, which essentially makes them labels for the 
  strings.
2008-01-22 00:13:42 +00:00
James Henstridge
fe853d0261 * psycopg/typecast.c (typecast_pydatetime): make array static.
(typecast_mxdatetime): same here.

	* psycopg/typecast_builtins.c (typecast_builtins): make array
	static.

	* psycopg/psycopgmodule.c: add hidden visibility to a bunch of
	global variables here.

	* psycopg/psycopg.h: add set QueryCanceledError and
	TransactionRollbackError to hidden visibility.
2008-01-21 21:41:17 +00:00
James Henstridge
e054004e8f Add more const qualifiers. 2008-01-21 21:01:08 +00:00
James Henstridge
eae563ac96 * psycopg/*.[ch]: add const qualifier to various string arguments
to functions (typecast functions and conn_switch_isolation_level).
2008-01-21 17:34:08 +00:00
James Henstridge
864d107325 * psycypg/*.h: apply HIDDEN to all global variables and functions
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.
2008-01-21 05:54:01 +00:00
James Henstridge
3265dd172d * tests/test_connection.py (ConnectionTests): add simple tests for
the Connection and Cursor "closed" attributes.

	* psycopg/cursor_type.c (psyco_curs_get_closed): add a "closed"
	attribute to cursors.  It will be True if either the cursor or its
	associated connection are closed.  This fixes bug #164.
2008-01-19 03:32:42 +00:00
James Henstridge
11b017fcbe * psycopg/pqpath.c (pq_raise): remove unused arguments to
function, and simplify.
	(pq_resolve_critical): make function static, since it isn't being
	used outside of pqpath.c any more.
2008-01-19 02:16:57 +00:00
James Henstridge
f64cbeda46 * tests/test_transaction.py (DeadlockSerializationTestCase): port
over some tests for serialisation and deadlock errors,
	demonstrating that TransactionRollbackError is generated.
	(QueryCancelationTests): add a test to show that
	QueryCanceledError is raised on statement timeouts.

	* psycopg2da/adapter.py (_handle_psycopg_exception): rather than
	checking exception messages, check for TransactionRollbackError.

	* psycopg/pqpath.c (exception_from_sqlstate): return
	TransactionRollbackError for 40xxx errors, and QueryCanceledError
	for 57014 errors.
	(pq_raise): If we are using an old server, use
	TransactionRollbackError if the error message contains "could not
	serialize" or "deadlock detected".

	* psycopg/psycopgmodule.c (_psyco_connect_fill_exc): remove
	function, since we no longer need to store pointers to the
	exceptions in the connection.  This also fixes a reference leak.
	(psyco_connect): remove _psyco_connect_fill_exc() function call.

	* psycopg/connection.h (connectionObject): remove exception
	members from struct.

	* psycopg/connection_type.c (connectionObject_getsets): modify the
	exception attributes on the connection object from members to
	getsets.  This reduces the size of the struct.

	* lib/extensions.py: import the two new extensions.

	* psycopg/psycopgmodule.c (exctable): add new QueryCanceledError
	and TransactionRollbackError exceptions.
2008-01-16 05:14:24 +00:00
James Henstridge
46bf23caf4 * tests/__init__.py (test_suite): add date tests to test suite.
* tests/test_dates.py: add tests for date/time typecasting and
	adaption.

	* psycopg/adapter_mxdatetime.c (mxdatetime_str): add support for
	outputting BC dates (which involves switching them to one-based
	dates).  Also remove broken handling of microseconds.

	* psycopg/typecast.c (typecast_parse_date): if the string ends
	with "BC" adjust the year value to be a zero-based BC value as
	used by mx.DateTime (datetime doesn't support BC dates).
	(typecast_parse_time): ignore ' ', 'B' and 'C' in time strings
	rather than treating them as part of the seconds part of the time.
2008-01-16 01:43:50 +00:00
James Henstridge
f18881983b * psycopg/typecast_array.c (typecast_array_scan): set an initial
value for quotes to keep gcc happy.

	* psycopg/*.c: add missing static modifier on many functions.
2008-01-13 16:05:59 +00:00
James Henstridge
7d80c05748 * tests/test_transaction.py
(TransactionTestCase.test_failed_commit): Expect IntegrityError
	instead of OperationalError.

	* psycopg/pqpath.c (exception_from_sqlstate): new function that
	converts an SQLSTATE error code to the corresponding exception
	class.
	(pq_raise): use exception_from_sqlstate() to pick which exception
	to use when working with protocol version 3.
	(pq_complete_error): Let pq_raise() pick an appropriate exception
	rather than forcing OperationalError.
2008-01-11 15:10:21 +00:00
James Henstridge
86597f6939 * psycopg/adapter_binary.c (binary_quote): apply Brandon Rhodes'
patch from ticket #209 to check return value from
	PyObject_AsCharBuffer().  This fixes the segfault.
	(binary_quote): switch from PyObject_AsCharBuffer() to
	PyObject_AsReadBuffer() to support buffer objects that don't
	implement the bf_getcharbuf protocol.

	* tests/types_basic.py (TypesBasicTests.testBinary): Test round
	tripping of bytea buffers.  Currently segfaults.
2008-01-10 22:19:23 +00:00
James Henstridge
729117af8b * psycopg/connection_int.c (conn_close): fix for new
pq_abort_locked() prototype.
	(conn_switch_isolation_level): fix for new pq_abort_locked()
	prototype, and use pq_complete_error() to show error message.
	(conn_set_client_encoding): same here.

	* psycopg/pqpath.c (pq_execute_command_locked): remove static
	modifier.
	(pq_complete_error): same here.
	(pq_abort_locked): add pgres and error arguments.
	(pq_abort): call pq_abort_locked() to reduce code duplication.
2008-01-10 18:14:44 +00:00
James Henstridge
d190d5918a 2007-12-23 James Henstridge <james@jamesh.id.au>
* psycopg/pqpath.c (pq_execute_command_locked): add an error
	argument to hold an error when no PGresult is returned by PQexec,
	rather than using pq_set_critical().
	(pq_complete_error): new function that converts the error returned
	by pq_execute_command_locked() to a Python exception.
	(pq_begin_locked): add error argument.
	(pq_commit): use pq_complete_error().
	(pq_abort): use pq_complete_error().
	(pq_abort_locked): always call pq_set_critical() on error, and
	clear the error message from pq_execute_command_locked().
	(pq_execute): use pq_complete_error() to handle the error from
	pq_begin_locked().

	* psycopg/pqpath.c (pq_begin): remove unused function.

	* psycopg/connection_type.c (psyco_conn_commit): if conn_commit()
	raises an error, just return NULL, since it is now setting an
	exception itself.
	(psyco_conn_rollback): same here.

	* psycopg/connection_int.c (conn_commit): don't drop GIL and lock
	connection before calling pq_commit().
	(conn_rollback): same here.
	(conn_close): use pq_abort_locked().
	(conn_switch_isolation_level): same here.
	(conn_set_client_encoding): same here.

	* psycopg/pqpath.h: add prototype for pq_abort_locked().

	* psycopg/pqpath.c (pq_commit): convert function to run with GIL
	held, and handle errors appropriately.
	(pq_abort): same here.
	(pq_abort_locked): new function to abort a locked connection.

2007-12-22  James Henstridge  <james@jamesh.id.au>

	* psycopg/pqpath.c (pq_raise): add a "pgres" argument so we can
	generate nice errors not related to a particular cursor.
	(pq_execute): use pq_begin_locked() rather than pq_begin().  Use
	pq_raise() to handle any errors from it.

	* psycopg/pqpath.c (pq_execute_command_locked): helper function
	used to execute a command-style query on a locked connection.
	(pq_begin_locked): a variant of pq_begin() that uses
	pq_execute_command_locked().
	(pq_begin): rewrite to use pq_begin_locked().
2008-01-10 06:14:20 +00:00
James Henstridge
5fe08ae83e 2007-12-22 James Henstridge <james@jamesh.id.au>
* psycopg/config.h: only print debug messages if
        psycopg_debug_enabled is true.

        * psycopg/psycopgmodule.c (init_psycopg): set
        psycopg_debug_enabled to true if the $PSYCOPG_DEBUG environment
        variable is set.
2007-12-22 13:03:41 +00:00
Federico Di Gregorio
d31b4add22 Applied win32 patch from Jason Erickson. 2007-12-21 00:18:55 +00:00
James Henstridge
4910f53b7e * psycopg/pqpath.c (pq_execute): uncomment the "curs->pgres ==
NULL" error handler after the PQexec() call.  This is needed to
	catch database disconnects (and probably other errors).  According
	to Federico, it was commented out to avoid a spurious error, so we
	should watch for problems.
2007-12-19 14:33:44 +00:00
James Henstridge
fd5d2d5238 * psycopg/pqpath.c (pq_raise): only remove the first 8 characters
of the exception message if it actually gives the severity.

	* psycopg/pqpath.h (pq_resolve_critical): add prototype, since
	this function is being used from connection_int.c.

	* psycopg/psycopg.h: update psyco_set_error() prototype.

	* psycopg/psycopgmodule.c (psyco_errors_init): set pgerror, pgcode
	and cursor class attributes to None on psycopg2.Error so that the
	attributes will always be available (simplifies error handling).
	(psyco_set_error): add const qualifiers to msg, pgerror and pgcode
	arguments.
	Don't bother setting pgerror, pgcode or cursor to None if they are
	not provided -- the class defaults take care of this.
2007-12-19 14:29:03 +00:00
Daniele Varrazzo
fd1ee6fffc Fixes to let the dbapi20 test suite pass.
Submitted by James Henstridge in ticket #195.
2007-11-11 10:18:43 +00:00
Daniele Varrazzo
75cb5d75d7 Use escape string syntax for string escape if connected to a server
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.
2007-11-11 08:53:44 +00:00
Daniele Varrazzo
70e555585e Fixed selection of the proper binary string quoting. 2007-11-09 13:00:37 +00:00
Daniele Varrazzo
272140f5c1 Use escape string syntax for binary escape if connected with a
server with ver >= 8.2.

The feature is only enabled when compiling psycopg with libpq
ver >= 8.0.
2007-11-09 05:51:12 +00:00
Daniele Varrazzo
277f57ffb0 - Hard limit on the connection.notices list to avoid them
growing indefinitely.
  Notices are treated as a queue: when the queue is full 
  drop the oldest notice.
2007-11-09 02:28:47 +00:00
Daniele Varrazzo
e1dd9ca843 Fixed bug #192 (Decimal support not safe for use with multiple sub
interpreters) as proposed by Graham Dumpleton.

If running in the main interpreter, use a cached version of the Decimal
object. Else repeat the object lookup.
2007-10-21 03:22:55 +00:00
Daniele Varrazzo
63773ad1e0 Added missing DECREF. 2007-10-18 17:29:15 +00:00
Daniele Varrazzo
c71b7a03d0 Added missing return in case out of memory. 2007-10-18 17:19:16 +00:00
Federico Di Gregorio
07892b29a6 Aggressive threading on fetch (and a new bug!) 2007-09-19 13:39:48 +00:00
Federico Di Gregorio
c9e701baa9 Fixed bug #194 (and added nice MD project not that C/C++ is supported.) 2007-09-08 08:54:30 +00:00
Federico Di Gregorio
46668d214b conn_commit/conn_rollback error handling (closes: #187). 2007-05-29 08:43:34 +00:00
Federico Di Gregorio
a07987cd90 Patchset copy_expert 5/5. 2007-05-29 08:30:24 +00:00
Federico Di Gregorio
b82c2f5cd9 Patchset copy_expert 4/5. 2007-05-29 08:23:35 +00:00
Federico Di Gregorio
c54e9142f4 Patchset copy_expert 3/5. 2007-05-29 08:16:44 +00:00
Federico Di Gregorio
3b2908b51e Patchset copy_expert 2/5. 2007-05-29 08:14:58 +00:00
Federico Di Gregorio
a23de80c6b Patchset copy_expert 1/5. 2007-05-29 08:13:40 +00:00
Federico Di Gregorio
a779c8ef99 .get_transaction_status() implementation. 2007-04-25 22:42:36 +00:00
Federico Di Gregorio
d6e232e2b9 Various fixes, now all examples work. 2007-04-13 14:07:11 +00:00
Federico Di Gregorio
8274a032b1 typecast_binary.c cleanup. 2007-04-13 01:17:54 +00:00
Federico Di Gregorio
967ec370ed int->size_t transition. 2007-04-13 01:16:22 +00:00
Federico Di Gregorio
2a6b523506 Fixed crash and win32 patches. 2007-04-11 04:16:00 +00:00
Federico Di Gregorio
d6f2aa27b7 Fixed mem and ref leak in connect(). 2007-04-10 06:51:35 +00:00
Federico Di Gregorio
e5829292cd Fixed both Python 2.5 and 64 bit problems. 2007-04-10 06:36:18 +00:00
Federico Di Gregorio
2ae0c32031 ZPsycopgDA now uses connection-level type-casters. 2007-02-23 15:23:06 +00:00
Federico Di Gregorio
6598a279e2 Added support for per-cursor and per-connection typecasters. 2007-02-22 15:16:54 +00:00
Federico Di Gregorio
c2e16b8901 Applied patch from #135. 2007-02-11 08:25:33 +00:00
Federico Di Gregorio
09c866221c Password obfuscation done right (closes: #147) 2007-02-11 08:11:22 +00:00
Federico Di Gregorio
3a94e747d7 Encodings from Karsten (part 2.) 2007-01-19 14:47:21 +00:00
Federico Di Gregorio
5642a68adb Encodings from Karsten. 2007-01-19 14:38:01 +00:00
Federico Di Gregorio
1c16009985 Added support for NULL in arrays (closes: #154) 2007-01-19 14:08:06 +00:00
Federico Di Gregorio
b074dd4d8b Encoding fixes. 2007-01-16 23:39:08 +00:00
Federico Di Gregorio
5c425f5294 Check for Python errors during copy (closes: #134). 2007-01-16 12:03:29 +00:00
Federico Di Gregorio
8c2c72a48a Applied patch from #148. 2007-01-16 11:32:01 +00:00
Federico Di Gregorio
e02f569dd3 Password obfuscation to close: #147. 2007-01-16 11:29:07 +00:00
Federico Di Gregorio
d342d37e27 Fixed problem with locales in mx.DateTime adaptation. 2007-01-16 10:47:28 +00:00
Federico Di Gregorio
d061b384d9 Fixed problem with year > 9999. 2007-01-16 07:57:22 +00:00
Federico Di Gregorio
f4dc6936a2 Builds again on win32 (closes: #132). 2006-10-29 03:12:51 +00:00
Federico Di Gregorio
ac5a747e95 Fixed precision and scale. 2006-10-21 07:33:44 +00:00
Federico Di Gregorio
d189203f9f .callproc() patch from Moshe (support for result sets.) 2006-10-03 05:54:22 +00:00
Federico Di Gregorio
96f631d41e Merge from 2.0 branch up to r839. 2006-09-30 06:57:35 +00:00
Federico Di Gregorio
4820213b7f Fixed fractionary seconds >59 problem (closes: #131) 2006-09-30 06:35:12 +00:00
Federico Di Gregorio
168d9c36af Fractionary seconds fix (closes: #130) 2006-09-30 06:16:24 +00:00
Federico Di Gregorio
1fe6269904 Piet Delport patches: final cleanup and PEP 353 macros. 2006-09-23 05:19:30 +00:00
Federico Di Gregorio
1d8af808bf Piet Delport patches: 3 of 3. 2006-09-23 05:15:36 +00:00
Federico Di Gregorio
474d8b9d51 Piet Delport patches: 2 of 3. 2006-09-23 05:14:24 +00:00
Federico Di Gregorio
3009a29b11 Piet Delport patches: 1 of 3. 2006-09-23 05:10:58 +00:00
Federico Di Gregorio
a9d307140e mx fix to build on win32. 2006-09-02 09:00:47 +00:00
Federico Di Gregorio
2007652589 mx fix to build on win32. 2006-09-02 09:00:39 +00:00
Federico Di Gregorio
dbd976bc03 Double mutex destroy fix. 2006-09-02 08:50:58 +00:00
Federico Di Gregorio
afaca71aa9 Double mutex destroy fix. 2006-09-02 08:50:30 +00:00
Federico Di Gregorio
269156d9bf Added some file-like attributes to lobject. 2006-09-02 05:33:03 +00:00
Federico Di Gregorio
64bd7ae61c Large objects landing.. 2006-09-02 04:57:50 +00:00
Federico Di Gregorio
616a1c2042 Preparing 2.0.5.1. 2006-09-02 01:09:31 +00:00
Federico Di Gregorio
36785f753b Work on large objects continue. 2006-09-01 17:15:27 +00:00
Federico Di Gregorio
0b9d13455d Missing file. 2006-09-01 16:44:07 +00:00
Federico Di Gregorio
b8f3cef62f psycopg is enlarging.. 2006-09-01 16:27:02 +00:00
Federico Di Gregorio
64933f2004 Merge from 2_0_x branch up to r814. 2006-09-01 13:46:57 +00:00
Federico Di Gregorio
3e0d8792a8 Preparing 2.0.5. 2006-09-01 12:42:03 +00:00
Federico Di Gregorio
9f9af5f907 Fixed patch from #119. 2006-09-01 12:36:38 +00:00
Federico Di Gregorio
b3fdd80452 Fixed OperationalError in connection objects. 2006-09-01 11:55:27 +00:00
Federico Di Gregorio
ec865ae932 .connect() port parameter as string or int (closes: #120). 2006-09-01 08:29:30 +00:00
Federico Di Gregorio
f88b973bd1 Empty binary buffer segfault fix (closes: #119). 2006-09-01 08:23:51 +00:00
Federico Di Gregorio
8eb118c63f Exposed connection status. 2006-09-01 08:20:11 +00:00
Federico Di Gregorio
53d10a3ddf Fixed compile problems on old gcc. 2006-09-01 08:02:41 +00:00
Federico Di Gregorio
6f0e578686 Null query segfault fix (closes: #117). 2006-09-01 07:45:58 +00:00
Federico Di Gregorio
23112a763d .executemany() fix (closes: #116). 2006-09-01 07:42:30 +00:00
Federico Di Gregorio
f202c7fc81 Preparing release 2.0.4. 2006-08-01 23:36:50 +00:00
Federico Di Gregorio
50e85bba65 Applied colum-selectionpatch (closes: #113). 2006-07-31 00:17:01 +00:00
Federico Di Gregorio
5e590d604f Fixed memory leak (closes: #114). 2006-07-31 00:02:08 +00:00
Federico Di Gregorio
b9f7c24a63 Interval conversion fix. 2006-07-26 05:13:08 +00:00
Federico Di Gregorio
b9fcde1b39 Fixed segfault in Binary/QString. 2006-06-18 05:57:01 +00:00
Federico Di Gregorio
cf7701a151 Little fixes. 2006-06-15 12:39:56 +00:00
Federico Di Gregorio
07be5df881 Fix for #93. 2006-06-11 05:09:59 +00:00
Federico Di Gregorio
0ce5207871 #warning fix. 2006-06-11 04:04:04 +00:00
Federico Di Gregorio
1ac75e3b80 (Really) fixed list adaptation. 2006-06-11 03:40:53 +00:00
Federico Di Gregorio
a9045916f2 Fixed list adaptation. 2006-06-11 03:40:16 +00:00
Federico Di Gregorio
9577f4e2a6 Fixed under-allocation (closes: #110) 2006-06-11 03:27:30 +00:00
Federico Di Gregorio
fb0b523586 Fixed string allocation (loses: #109) 2006-06-11 03:19:18 +00:00
Federico Di Gregorio
bfb00b86fd Better PostgreSQL version check. 2006-05-26 05:22:49 +00:00
Federico Di Gregorio
ec877b0ef9 Final of 8.1.4 securiy patch. 2006-05-24 10:29:35 +00:00
Federico Di Gregorio
5f8eddfcab Second half of 8.1.4 securiy patch. 2006-05-24 10:02:33 +00:00
Federico Di Gregorio
9299073649 First half of 8.1.4 securiy patch. 2006-05-24 09:43:55 +00:00
Federico Di Gregorio
3806f9688b Boolean fix for arrays. 2006-04-24 05:42:02 +00:00
Federico Di Gregorio
559149824b Small 64 bit fix. 2006-03-02 13:47:30 +00:00
Federico Di Gregorio
77398c759e Fixed handle leak on win32 and preparing 2.0 beta 8. 2006-02-11 11:01:17 +00:00
Federico Di Gregorio
94d663c6b6 Fixed memory overflow. 2006-02-11 06:57:34 +00:00
Daniele Varrazzo
202c002c5c * Docstrings added/fixed
* Added __all__ attributes to Python modules to explicit the package API
2006-01-12 18:36:57 +00:00
Federico Di Gregorio
5871596eda Some more tests in sandbox. 2006-01-10 16:13:37 +00:00
Federico Di Gregorio
96ff591d79 Extra attributes for ProgrammingError exception. 2006-01-05 08:13:03 +00:00
Federico Di Gregorio
7db16edad3 Connection encoding case fix (closes: #83). 2006-01-01 09:10:17 +00:00
Federico Di Gregorio
e72f3dba40 Fixed problem with array results that begin with "[...]=". (Closes: #80) 2005-12-11 08:21:20 +00:00
Federico Di Gregorio
61de8690e9 Fixed problem with "fractionary" time zones (Closes: #78). 2005-12-11 07:50:27 +00:00
Federico Di Gregorio
5ea2fa636f Better DictCursor. 2005-12-06 05:55:58 +00:00
Federico Di Gregorio
127c14809c Fixed very stupid typo that resulted in a very big bug (reported by Andrea Arcangeli.) 2005-12-06 05:38:39 +00:00
Federico Di Gregorio
3937ea3ece Added aync.txt to distribution. 2005-11-29 12:01:46 +00:00
Daniele Varrazzo
ad76b5ba3c * psycopg/psycopgmodule.c: fixed exceptions refcount.
* fixed lots of doctrings and added Epydoc-generated docs support.
2005-11-26 07:47:48 +00:00
Federico Di Gregorio
81bc23a54e Fixed problem with type object dealloc. 2005-11-24 03:21:37 +00:00
Federico Di Gregorio
a6be5bf7bc Fixed problem in microseconds conversion (really this time.) 2005-11-20 05:01:13 +00:00
Federico Di Gregorio
03c0a258a2 Fixed problem in microseconds conversion. 2005-11-20 04:54:33 +00:00
Federico Di Gregorio
996bd07c85 Definitely fixed date and time adapting problems (for mx too!) 2005-11-16 17:30:45 +00:00
Federico Di Gregorio
65fe7db04d Does not crash on importing needed modules. (Closes: #32) 2005-11-15 11:51:05 +00:00
Federico Di Gregorio
164eb32817 New time/date locale-safe typecasting code. 2005-11-14 11:57:45 +00:00
Federico Di Gregorio
770e7c34d3 Fixed problem with unitialized value in dsize. 2005-11-07 14:26:41 +00:00
Federico Di Gregorio
e727c49134 Converted typecast class to new-style and implemented much better compare method. 2005-11-03 18:28:04 +00:00
Federico Di Gregorio
c5bc1a3b9a Small changes to interval parsing. 2005-11-03 16:03:06 +00:00
Federico Di Gregorio
f03b94d84b Run-time check for Decimal on Python 2.3. 2005-11-03 01:35:17 +00:00
Federico Di Gregorio
d67b171eed Fixed problem with .callproc(). 2005-10-26 01:10:03 +00:00
Federico Di Gregorio
ef3430d24f Implemented named cursors. 2005-10-22 06:59:31 +00:00
Federico Di Gregorio
49a255059e Releasing 2.0 beta 5. 2005-10-18 14:44:57 +00:00
Federico Di Gregorio
ec31179c9e NOTIFY works again. 2005-10-18 14:07:17 +00:00
Federico Di Gregorio
c7c2c38bcd Epydoc clean. :D 2005-10-18 05:57:02 +00:00
Federico Di Gregorio
3168e7b95d Better epydoc support. 2005-10-18 05:29:42 +00:00
Federico Di Gregorio
7eda959258 We should now build on ZETA. 2005-10-18 03:57:52 +00:00
Federico Di Gregorio
6b0b634bae Code cleanup. 2005-10-18 01:29:47 +00:00
Federico Di Gregorio
a1ed1fb267 Added localtime_r for platforms not providing it. 2005-10-17 16:16:47 +00:00
Federico Di Gregorio
a237209a5e Default tzinfo_factory for cursors. 2005-10-17 16:04:43 +00:00
Federico Di Gregorio
206aa79225 Working on TZ issues. 2005-10-17 15:01:14 +00:00
Federico Di Gregorio
5715a74388 Applied patches to fix docstrings. 2005-10-17 06:17:34 +00:00
Federico Di Gregorio
8e453ce176 Last changes to .set_isolation_level(). 2005-10-08 03:15:17 +00:00
Federico Di Gregorio
6e69ac665f Default isolation level set to 2 if not set in the server. 2005-10-08 03:14:13 +00:00
Federico Di Gregorio
e1688431e0 Isolation level changes. 2005-10-08 03:04:40 +00:00
Federico Di Gregorio
8920c2662b Appliced callproc patch. 2005-10-01 14:58:25 +00:00
Federico Di Gregorio
67720de497 Fixed segfault in connection.set_client_encoding(). 2005-09-30 16:48:41 +00:00
Federico Di Gregorio
39136e1af4 Docstrings fixes. 2005-09-30 16:18:26 +00:00
Federico Di Gregorio
f4b52e8cdd Mingw and ZPsycopgDA fixes. 2005-09-12 02:23:17 +00:00
Federico Di Gregorio
c123389378 Ported mxDateTime formatting changes from 1.1.x. 2005-08-22 15:45:06 +00:00
Federico Di Gregorio
3e3084e4c6 Small changes and fixes for RC 1. 2005-08-07 02:20:46 +00:00
Federico Di Gregorio
20013f6ff9 Fixing gcc 4 warnings. 2005-07-26 14:49:30 +00:00
Federico Di Gregorio
b17acddcf5 1900 years shift fix. 2005-07-21 08:36:55 +00:00
Federico Di Gregorio
5edfdc2a54 INTERVAL overflow fix. 2005-06-24 07:11:44 +00:00
Federico Di Gregorio
0c56bc95df Fixed connection parameters. 2005-06-13 04:25:09 +00:00
Federico Di Gregorio
7d2109f979 Don't segfault on empty queries anymore (closes: #24). 2005-06-13 03:54:24 +00:00
Federico Di Gregorio
7ead773fc0 TimestampFromTicks fix. 2005-06-02 06:56:21 +00:00
Federico Di Gregorio
b300cd2550 Fixed .execute() segfault. 2005-06-02 04:30:31 +00:00
Federico Di Gregorio
5322b4e92f Fixed unicode query conversion segfault. 2005-05-31 01:55:02 +00:00
Federico Di Gregorio
1af8b57706 ZPsycopgDA work. 2005-05-26 07:34:27 +00:00
Federico Di Gregorio
63698c6c28 Little cursor fix. 2005-05-19 01:18:21 +00:00
Federico Di Gregorio
e1e0b34343 Fixed wrong refcnt on None. 2005-05-15 10:29:59 +00:00
Federico Di Gregorio
d57ceaadc6 Release 2.0 beta 1. 2005-05-09 09:48:40 +00:00
Federico Di Gregorio
8c2ac0658c Added error codes to messages. 2005-05-09 09:07:07 +00:00
Federico Di Gregorio
b1745ff139 Various fixes. 2005-05-09 08:54:32 +00:00
Federico Di Gregorio
65a4b86fa2 chunk/buffer patch applied. 2005-05-09 08:11:43 +00:00
Federico Di Gregorio
b5b5cc71a7 Applied .executemany() iterator patch. 2005-05-09 06:52:30 +00:00
Federico Di Gregorio
48d8bd39a1 Array support completed (closes: #1). 2005-04-10 05:38:34 +00:00
Federico Di Gregorio
4805a93569 mingw patch from Daniele Varazzo. 2005-04-10 03:05:39 +00:00
Federico Di Gregorio
fdb68599c7 psycopg1 compatibility module. 2005-04-03 06:13:24 +00:00
Federico Di Gregorio
5db7764207 Fixed .rowcount (closes: #6). 2005-03-31 06:26:19 +00:00
Federico Di Gregorio
f4ad71fc1d GIL-related fixes. 2005-03-29 06:00:38 +00:00
Federico Di Gregorio
75e7273d85 Solid tokenization code. 2005-03-23 17:17:48 +00:00
Federico Di Gregorio
cb9cec57c0 Array support for all basic types. 2005-03-23 11:02:13 +00:00
Federico Di Gregorio
19cb161d27 Array tokenization seems working. 2005-03-23 10:32:30 +00:00
Federico Di Gregorio
cddb1a15d4 Array quoting (not completely working.) 2005-03-23 00:43:36 +00:00
Federico Di Gregorio
def14d5925 Array support works, at least for INTEGERS. 2005-03-22 16:33:57 +00:00
Federico Di Gregorio
07a38c31cd Starting array work. 2005-03-22 14:20:20 +00:00
Federico Di Gregorio
30b2ba6ebf .executemany() fixes. 2005-03-12 09:19:59 +00:00
Federico Di Gregorio
19c5129d5b First try at .executemany() implementation. 2005-03-12 07:22:48 +00:00
Federico Di Gregorio
9316c6af53 Optimizations to type casting (in preparation to array support.) 2005-03-12 06:39:47 +00:00
Federico Di Gregorio
22ce01eec7 AsIs str fix by Matt Goodall. 2005-03-03 15:01:45 +00:00
Federico Di Gregorio
c787de5aad Added __conform__ to all adapters (typos excluded.) 2005-03-03 06:39:18 +00:00
Federico Di Gregorio
515d66cc9f Added __conform__ to all adapters. 2005-03-03 06:31:03 +00:00
Federico Di Gregorio
e816aa07b6 Adding missing __conform__ methods before release. 2005-03-02 14:51:24 +00:00
Federico Di Gregorio
e8e6c0ada3 Preparing release 1.99.12. 2005-03-02 14:16:55 +00:00
Federico Di Gregorio
3cf4b7ca6f Finished COPY TO/COPY FROM implementation. 2005-03-02 14:07:03 +00:00
Federico Di Gregorio
e5f558a6be COPY FROM works. 2005-03-01 16:41:02 +00:00
Federico Di Gregorio
3141770f53 asprintf() removal. 2005-03-01 07:06:11 +00:00
Federico Di Gregorio
cd672525e1 Adaptation fixes (a lot.) 2005-02-28 15:50:55 +00:00
Federico Di Gregorio
55744b00cd Much better examples. 2005-02-27 15:25:24 +00:00
Federico Di Gregorio
bd5b76d0e4 The Andrea's-bunch-o-fixes (2). 2005-01-29 04:19:39 +00:00
Federico Di Gregorio
b742c48c67 The Andrea's-bunch-o-fixes. 2005-01-29 04:16:25 +00:00
Federico Di Gregorio
1141149cd3 License changes. Fixes. Added register_adapter(). 2005-01-20 05:49:40 +00:00
Federico Di Gregorio
280562890b rowcount fix. 2004-12-20 02:32:08 +00:00
Federico Di Gregorio
08a4965342 isready/prefetch fix. 2004-12-14 03:33:03 +00:00
Federico Di Gregorio
06ef93271a Renaming types. 2004-12-13 14:29:42 +00:00
Federico Di Gregorio
1b74bb897f async fixes and better connection/cursor management. 2004-12-10 10:34:57 +00:00
Federico Di Gregorio
61b4ff6e6f First fixed to the async core. 2004-11-20 10:57:54 +00:00
Federico Di Gregorio
988095298e DictCursor fixes again. 2004-11-19 15:50:57 +00:00
Federico Di Gregorio
818caa5637 Fixes to row_factory. 2004-11-19 15:30:07 +00:00
Federico Di Gregorio
c904d97f69 Initial psycopg 2 import after SVN crash. 2004-10-19 03:17:12 +00:00