summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/postgresql/pypostgresql.py
Commit message (Collapse)AuthorAgeFilesLines
* happy new year 2023Mike Bayer2023-01-031-1/+1
| | | | Change-Id: I14db8e9c69a832b0f5dae8036db3c0a70bb49edd
* happy new year 2022Mike Bayer2022-01-061-1/+1
| | | | Change-Id: Ic38dbc640aa0fe8a784a5b5e57c45a41eb0ea01b
* Replace all http:// links to https://Federico Caselli2021-07-041-2/+2
| | | | | | Also replace http://pypi.python.org/pypi with https://pypi.org/project Change-Id: I84b5005c39969a82140706472989f2a30b0c7685
* Default caching to opt-out for 3rd party dialectsMike Bayer2021-04-011-0/+1
| | | | | | | | | | | | | | | | | | | Added a new flag to the :class:`_engine.Dialect` class called :attr:`_engine.Dialect.supports_statement_cache`. This flag now needs to be present directly on a dialect class in order for SQLAlchemy's :ref:`query cache <sql_caching>` to take effect for that dialect. The rationale is based on discovered issues such as :ticket:`6173` revealing that dialects which hardcode literal values from the compiled statement, often the numerical parameters used for LIMIT / OFFSET, will not be compatible with caching until these dialects are revised to use the parameters present in the statement only. For third party dialects where this flag is not applied, the SQL logging will show the message "dialect does not support caching", indicating the dialect should seek to apply this flag once they have verified that no per-statement literal values are being rendered within the compilation phase. Fixes: #6184 Change-Id: I6fd5b5d94200458d4cb0e14f2f556dbc25e27e22
* happy new yearMike Bayer2021-01-041-1/+1
| | | | Change-Id: Ic5bb19ca8be3cb47c95a0d3315d84cb484bac47c
* Deprecate unsupported dialects and dbapiFederico Caselli2020-04-291-0/+16
| | | | | | | | | | | | | | | | | - Deprecate dialects firebird and sybase. - Deprecate DBAPI - mxODBC for mssql - oursql for mysql - pygresql and py-postgresql for postgresql - Removed adodbapi DBAPI for mssql Fixes: #5189 Change-Id: Id9025f4f4de7e97d65aacd0eb4b0c21beb9a67b5
* happy new yearMike Bayer2020-01-011-1/+1
| | | | Change-Id: I08440dc25e40ea1ccea1778f6ee9e28a00808235
* Note DBAPIs and dialects that we don't supportMike Bayer2019-07-051-0/+6
| | | | | | | | | | | | | | Since we have strong CI for the DBAPIs and dialects that are actively supported, this indicates that those DBAPIs that aren't in CI are continuing to fall behind in support, to the point where we can not address issues that may arise. As such, the Sybase and Firebird dialects overall are moving into an explicit "not supported" zone where we would like to eventually remove them. Additionally, a pass is made through legacy MySQL and PostgreSQL DBAPI dialects as well as those which we aren't able to include in CI to note that these DBAPIs aren't actively supported by the project. Change-Id: I61f1515b97b741b7534b54e434e3e47065df7b5d
* happy new yearMike Bayer2019-01-111-1/+1
| | | | Change-Id: I6a71f4924d046cf306961c58dffccf21e9c03911
* Post black reformattingMike Bayer2019-01-061-7/+7
| | | | | | | | | | | | | Applied on top of a pure run of black -l 79 in I7eda77fed3d8e73df84b3651fd6cfcfe858d4dc9, this set of changes resolves all remaining flake8 conditions for those codes we have enabled in setup.cfg. Included are resolutions for all remaining flake8 issues including shadowed builtins, long lines, import order, unused imports, duplicate imports, and docstring issues. Change-Id: I4f72d3ba1380dd601610ff80b8fb06a2aff8b0fe
* Run black -l 79 against all source filesMike Bayer2019-01-061-11/+17
| | | | | | | | | | | | | | This is a straight reformat run using black as is, with no edits applied at all. The black run will format code consistently, however in some cases that are prevalent in SQLAlchemy code it produces too-long lines. The too-long lines will be resolved in the following commit that will resolve all remaining flake8 issues including shadowed builtins, long lines, import order, unused imports, duplicate imports, and docstring issues. Change-Id: I7eda77fed3d8e73df84b3651fd6cfcfe858d4dc9
* happy new yearMike Bayer2018-01-121-1/+1
| | | | Change-Id: I3ef36bfd0cb0ba62b3123c8cf92370a43156cf8f
* update for 2017 copyrightMike Bayer2017-01-041-1/+1
| | | | Change-Id: I4e8c2aa8fe817bb2af8707410fa0201f938781de
* - happy new yearMike Bayer2016-01-291-1/+1
|
* - Added support for the case of the misbehaving DBAPI that hasMike Bayer2015-05-151-0/+17
| | | | | | | | | | | pep-249 exception names linked to exception classes of an entirely different name, preventing SQLAlchemy's own exception wrapping from wrapping the error appropriately. The SQLAlchemy dialect in use needs to implement a new accessor :attr:`.DefaultDialect.dbapi_exception_translation_map` to support this feature; this is implemented now for the py-postgresql dialect. fixes #3421
* - copyright 2015Mike Bayer2015-03-101-1/+1
|
* - apply pep8 formatting to sqlalchemy/sql, sqlalchemy/util, sqlalchemy/dialects,Brian Jarrett2014-07-201-1/+2
| | | | sqlalchemy/orm, sqlalchemy/event, sqlalchemy/testing
* - break up the <authors> copyright comment as part of a passMike Bayer2014-07-091-1/+2
| | | | to get all flake8 passing
* - happy new yearMike Bayer2014-01-051-1/+1
|
* happy new year (see #2645)Diana Clarke2013-01-011-1/+1
|
* just a pep8 pass of lib/sqlalchemy/dialects/postgresqlDiana Clarke2012-11-191-2/+7
|
* - rework the sphinx customizations into distinct modulesMike Bayer2012-10-191-13/+6
| | | | | | | - build a new Sphinx extension that allows dialect info to be entered as directives which is then rendered consistently throughout all dialect/dbapi sections - break out the "empty_strings" requirement for oracle test
* - move out maxdbMike Bayer2012-10-181-1/+8
| | | | | | - begin consolidating docs for dialects to be more self contained - add a separate section for "external" dialects - not sure how we're going to go with this yet.
* more import cleanupsMike Bayer2012-08-071-4/+4
|
* typoes in lib/sqlalchemy/dialectsDiana Clarke2012-03-171-1/+1
|
* happy new yearMike Bayer2012-01-041-1/+1
|
* - fix pypostgresql typo, [ticket:2185]Mike Bayer2011-07-041-1/+1
| | | | | | | | | | | | | | | | | | - rewrite "getting a session" docs to delineate all sessionmaker() use cases distinctly - rewrite "Managing Transactions" doc to spell out each specific step completely, [ticket:2204] - add to create_engine() and main "engine" doc an unambiguous statement that the create_engine() does not create a connection - other link fixes - rewrite "deleting" section so that "deleting from collections" is separate, well-described, [ticket:2202] - rephrase "autocommit mode" into its own section, move it down, put some bold text that you shouldn't be using it. - simplify the "subtransactions" section and make it local to "autocommit" since it is utterly unneeded by anybody. - oracle is not doing 2-phase anytime soon
* - add connection and cursor to is_disconnect(). We aren't using it yet,Mike Bayer2011-02-091-1/+1
| | | | | | | | | | | | | | | but we'd like to. Most DBAPIs don't give us anything we can do with it. Some research was done on psycopg2 and it still seems like they give us no adequate method (tried connection.closed, cursor.closed, connection.status). mxodbc claims their .closed attribute will work (but I am skeptical). - remove beahvior in pool that auto-invalidated a connection when the cursor failed to create. That's not the pool's job. we need the conn for the error logic. Can't get any tests to fail, curious why that behavior was there, guess we'll find out (or not). - add support for psycopg2 version detection. even though we have no use for it yet... - adjust one of the reconnect tests to work with oracle's horrendously slow connect speed
* - clean up copyright, update for 2011, stamp every file withMike Bayer2011-01-021-0/+6
| | | | | a consistent tag - AUTHORS file
* Ridding the world of a few wasteful imports.Michael Trier2010-12-191-1/+0
|
* - support for cdecimalMike Bayer2010-12-111-1/+0
| | | | | | | | | | | | | | | | | | - add --with-cdecimal flag to tests, monkeypatches cdecimal in - fix mssql/pyodbc.py to not use private '_int' accessor in decimal conversion routines - pyodbc version 2.1.8 is needed for cdecimal in any case as previous versions also called '_int', 2.1.8 adds the same string logic as our own dialect, so that logic is skipped for modern pyodbc version - make the imports for "Decimal" consistent across the whole lib. not sure yet how we should be importing "Decimal" or what the best way forward is that would allow a clean user-invoked swap of cdecimal; for now, added docs suggesting a global monkeypatch - the two decimal libs are not compatible with each other so any chance of mixing produces serious issues. adding adapters to DBAPIs tedious and adds in-python overhead. suggestions welcome on how we should be doing Decimal/cdecimal.
* - PG doc updatesMike Bayer2010-07-131-1/+1
| | | | | | - pypostgresql has 15 errors, 3 failures, this probably puts it in the "yes" as opposed to the "partial" support category. [ticket:1850]
* - name all the "sub" dialect components <DB><component>_<dialectname>, ↵Mike Bayer2010-03-141-4/+4
| | | | [ticket:1738]
* Changed the py-postgresql dialect to indicate that it is using the pyformat ↵Michael Trier2010-02-231-7/+4
| | | | parameter style.
* The py-postgresql dialect now supports sane rowcounts.Michael Trier2010-02-221-1/+3
|
* Fixed up the pypostgresql PGNumeric bind_processor to convert input to a string.Michael Trier2010-02-221-1/+1
|
* - Added an optional C extension to speed up the sql layer byGaëtan de Menten2010-02-131-6/+2
| | | | | | | | | | | | | | | reimplementing the highest impact functions. The actual speedups will depend heavily on your DBAPI and the mix of datatypes used in your tables, and can vary from a 50% improvement to more than 200%. It also provides a modest (~20%) indirect improvement to ORM speed for large queries. Note that it is *not* built/installed by default. See README for installation instructions. - The most common result processors conversion function were moved to the new "processors" module. Dialect authors are encouraged to use those functions whenever they correspond to their needs instead of implementing custom ones.
* - changed a few isinstance(value, Decimal) to "is not None", where appropriateGaëtan de Menten2009-11-281-1/+1
| | | | - fixed result processor for Numeric(asdecimal=False) on MSSQL.
* - pg8000 + postgresql dialects now check for float/numeric returnMike Bayer2009-11-151-1/+1
| | | | | | | | | | types to more intelligently determine float() vs. Decimal(), [ticket:1567] - since result processing is a hot issue of late, the DBAPI type returned from cursor.description is certainly useful in cases like these to determine an efficient result processor. There's likely other result processors that can make use of it. But, backwards incompat change to result_processor(). Happy major version number..
* - DefaultRunner and subclasses have been removed. The jobMike Bayer2009-10-151-8/+2
| | | | | | | of this object has been simplified and moved into ExecutionContext. Dialects which support sequences should add a `fire_sequence()` method to their execution context implementation. [ticket:1566]
* merge 0.6 series to trunk.Mike Bayer2009-08-061-0/+80