Commit Graph
83 Commits
Author SHA1 Message Date
Cédric Krier 1e0d860fe3 Use simple connection to list databases
When we instantiate a Database for each database to test, the threaded
connection pool keep one connection opens which could consume all the available
connections even if the databases are not really used.

issue5368
review16091002
2016-03-16 22:12:22 +01:00
Nicolas Évrard 2fef479575 Follow PEP-0249 for Transaction and backends
issue4949
review19781002
2016-03-03 21:51:57 +01:00
Cédric Krier 29129855ec Add support for Python 3
issue3211
review7311002
2016-02-07 16:46:16 +01:00
Nicolas Évrard d0c5d9692a Remove buggy split introduced in changeset 5eb1afcd5fd6 2016-01-18 22:34:04 +01:00
Nicolas Évrard 88f1bce6d4 Strip and unquote double-quote from Postgresql schema in search_path
issue5248
review16931002
2016-01-18 19:09:48 +01:00
Sharoon Thomas 89de660c52 Move webdav into a separate module
issue4703
review7101002
2016-01-16 19:20:30 +01:00
Cédric Krier 109d0ef64f Manage PostgreSQL schema
Replace usage of pg_catalog tables by information_schema to take care of user
access.
Ensure to fetch the columns information from the right schema.
Prevent to update default column values if it did not change.
Comment table and column only if the current user is the owner.

issue4924
review24291002
2015-09-04 11:16:09 +02:00
Cédric Krier 6cd05ed6fe Add has_multirow_insert
There are still many databases that doesn't support this SQL-92 syntax.

issue4881
review19331002
2015-07-28 08:04:29 +02:00
Cédric Krier eddb17dea7 Re-factor dict* methods on each cursor into the interface
issue4807
review7241002
2015-06-15 01:18:07 +02:00
Cédric Krier 52ff97b165 Rename ir.module.module* into ir.module*
issue4764
review7171002
2015-05-28 21:02:01 +02:00
Cédric Krier 87ea42c126 Unquote username and password from URI
issue4747
review7131002
2015-05-19 09:48:07 +02:00
Albert Cervera i Areny f707c695e4 Close template1 connection on database restore.
review6241002
issue4717
2015-04-27 22:49:25 +02:00
Cédric Krier 58b357b55f Improve config to be Python3 compatible
issue4662
review14131002
2015-03-22 03:20:53 +01:00
Cédric Krier 39e7eeeadb Add support for psycopg2cffi and PyPy
issue4408
review11741002
2015-03-15 15:52:03 +01:00
Cédric Krier 20484bb013 Fix formatting in logger calls 2015-03-05 11:32:18 +01:00
Cédric Krier 0991a552de Add TimeDelta field
And remove float_time widget.

issue4026
review5911002
2015-02-09 22:58:56 +01:00
Cédric Krier de081a63e8 Fix typo when retrieving PGUSER from environ
introduced in changeset 277c10477f84
2015-01-17 17:19:44 +01:00
Mariano Benedettini 53194e3784 Fix database dump when port is specified in db uri
Since changeset 01399128964f, the uri port is an integer and so it must be
convert to string for command line.

issue4490
review6861002
2015-01-16 13:52:25 +01:00
Cédric Krier 4891d337c9 Use PGUSER for postgresql database list
psycopg2 uses the PGUSER environment variable if no user name defined.

issue4478
review11801002
2015-01-15 23:49:13 +01:00
Cédric Krier 324d75ec8c Use NOWAIT when locking a table
lock is used to enforce a serializable level for all transaction using on the
same table. This is not achieved if transactions are waiting for the lock
instead of abort and retry with a new transaction because they will still have
the initial transaction row values with the repeatable read level.

issue4373
review5901002
2015-01-03 11:37:24 +01:00
Cédric Krier c144f8c349 Fix most flake8 errors
review8771002
2014-12-02 12:54:01 +01:00
Cédric Krier e0b995abbe Refactore configuration to allow easy extention
issue3627
review7401002
2014-09-03 23:32:01 +02:00
Albert Cervera i Areny ce781a5d0e Use EXCLUSIVE MODE when locking PostgreSQL tables.
Previous implementation used ACCESS EXCLUSIVE MODE (PostgreSQL's default) which
does not allow SELECTs on the locked table. This is too pessimistic so it's been
replaced by a plain EXCLUSIVE MODE which still blocks INSERTs and UPDATEs
but not SELECTs.

review1011002
issue2280
2013-12-19 20:58:13 +01:00
Cédric Krier c46a026c40 Refactore Transaction to add close and autocommit
review2151002
2013-12-18 18:09:43 +01:00
Cédric Krier 17bbcef17d Remove unused regexp
review2081002
2013-12-06 11:45:07 +01:00
Cédric Krier be197317c8 Ensure same time zone between trytond and postgresql
issue3423
review1135002
2013-10-14 21:05:36 +02:00
Cédric Krier cbe59c6bb3 Remove print statement in Cursor.execute 2013-09-11 16:12:25 +02:00
Cédric Krier fc6c6cfdda Migration to python-sql
* Use python-sql
* Add convert_domain method on Fields
* Add sql_format and sql_type methods on Fields
* Allow to return a full domain for Function.searcher
* Replace static backend by dynamic get method
* Replace order_field by order_<field name> method

review1001002
2013-09-06 22:32:37 +02:00
Cédric Krier 5e01f5c068 Fix flake8 2013-02-27 22:50:31 +01:00
Cédric Krier b553af8245 Don't delete cursor attribute in Cursor
The comment about this code is strange and doesn't reflect the behavior of the
connection pool.

issue2863
review612002
2012-12-23 22:50:54 +01:00
Pierre-Louis Bonicoli 6632b8e253 set_session would impact all next transactions too
issue2885
2012-11-11 22:25:34 +01:00
Cédric Krier a09d9a54a1 Simplify module information with python configuration
review363001
2012-06-08 19:32:23 +02:00
Cédric Krier ee3be37a36 Fix pep8 and pyflakes 2012-04-01 23:08:15 +02:00
Cédric Krier be0e5c54a9 Simplify workflow engine
- Remove workflow module
- Add ir.model.button for access rights

review256001
2012-03-25 00:15:17 +01:00
Cédric Krier 7d457f46c4 Store session in database
review210012
2012-01-11 20:30:27 +01:00
Cédric Krier 8b33421403 Use XML-RPC struct for Decimal and Date
review191006
2011-12-22 22:17:08 +01:00
Nicolas Évrard 0a471486e0 correct pyflake errors
review164003
2011-11-02 15:49:38 +01:00
Cédric Krier ec4c38b84a Switch from SERIALIZABLE to REPEATABLE_READ isolation level of PostgreSQL
Until before PostgreSQL 9.1 serializable was the same as repeatable read.
As we use explicit locking, repeatable read is enough.

review151006
2011-10-17 09:47:26 +02:00
Nicolas Évrard 66717ae533 Version number should be tuple for postgresl has_returning 2011-10-05 18:29:30 +02:00
Cédric Krier 1ab6964687 Add readonly on Transaction
review80005
2011-08-21 11:05:51 +02:00
Cédric Krier 0f3ba1f69f Use RETURNING in INSERT if available
review21003
2011-08-21 10:20:23 +02:00
Cédric Krier 852f04dc51 Remove support of Python2.5 and fix py3 warnings 2011-07-12 00:16:15 +02:00
Cédric Krier 8687b8914d Handle closing of file objects 2011-01-08 20:29:00 +01:00
Cédric Krier 9bfc2b93e1 Add adapter for Float in PostgreSQL backend for issue1707 2010-10-03 18:42:58 +02:00
Cédric Krier a5cbd5264f Old versions of psycopg2 don't have PYDATE, PYDATETIME and PYTIME 2010-09-26 10:47:37 +02:00
Cédric Krier 7314ffc54d Fix when psycopg is compiled with mxdatetime option for issue1698 2010-09-25 16:32:17 +02:00
Cédric Krier c4b9b9e6c4 Fix typo in test query for PostgreSQL and SQLite thanks to Ralf Peschke 2010-07-11 15:29:29 +02:00
Cédric Krier 483afed26a Catch only Exception according to PEP 352 2010-07-08 19:53:39 +02:00
Cédric Krier 8951e54c86 Add decimal digits validation on fields and fix Float and Numeric for lost of precision 2010-03-11 15:27:40 +01:00
Cédric Krier cb63509356 Add MySQL backend 2010-02-25 16:43:04 +01:00