summaryrefslogtreecommitdiff
path: root/test/dialect/postgresql
Commit message (Collapse)AuthorAgeFilesLines
* PEP 8 tidy of pg8000 dialect and postgresql/test_dialect.pypr/88Tony Locke2014-05-221-50/+40
|
* Autocommit isolation level for postgresql+pg8000Tony Locke2014-05-221-7/+13
| | | | | | | | As with postgresql+psycopg2, execution_options(isolation_level='AUTOCOMMIT') now works for the postgresql+pg8000 dialect. Also enabled the autocommit test in test_dialect.py for pg8000.
* pg8000 now passes test_extract() testTony Locke2014-05-211-1/+0
|
* Two tests now work for pg800 in EnumTestTony Locke2014-05-211-6/+0
| | | | | The two tests, test_create_table() and test_unicode_labels() previously failed under pg8000, but now they pass, so this commit opens them up.
* - changelog for #2785Mike Bayer2014-05-161-29/+15
| | | | | - refactor tests a bit fixes #2785
* zero_indexes-param-for-postgresql-ARRAY-typeAlexey Terentev2014-05-131-0/+53
|
* Fix many typos throughout the codebasepr/85Alex Gaynor2014-04-263-3/+3
| | | | Found using: https://github.com/intgr/topy
* - Fixed regression caused by release 0.8.5 / 0.9.3's compatibilityMike Bayer2014-03-251-1/+1
| | | | | | | | | enhancements where index reflection on Postgresql versions specific to only the 8.1, 8.2 series again broke, surrounding the ever problematic int2vector type. While int2vector supports array operations as of 8.1, apparently it only supports CAST to a varchar as of 8.3. fix #3000
* pytest calls all the descriptors. and we can't call this one unconditionallyMike Bayer2014-03-041-7/+6
|
* - Support has been added for pytest to run tests. This runnerMike Bayer2014-03-032-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | is currently being supported in addition to nose, and will likely be preferred to nose going forward. The nose plugin system used by SQLAlchemy has been split out so that it works under pytest as well. There are no plans to drop support for nose at the moment and we hope that the test suite itself can continue to remain as agnostic of testing platform as possible. See the file README.unittests.rst for updated information on running tests with pytest. The test plugin system has also been enhanced to support running tests against mutiple database URLs at once, by specifying the ``--db`` and/or ``--dburi`` flags multiple times. This does not run the entire test suite for each database, but instead allows test cases that are specific to certain backends make use of that backend as the test is run. When using pytest as the test runner, the system will also run specific test suites multiple times, once for each database, particularly those tests within the "dialect suite". The plan is that the enhanced system will also be used by Alembic, and allow Alembic to run migration operation tests against multiple backends in one run, including third-party backends not included within Alembic itself. Third party dialects and extensions are also encouraged to standardize on SQLAlchemy's test suite as a basis; see the file README.dialects.rst for background on building out from SQLAlchemy's test platform.
* - Support has been improved for Postgresql reflection behavior on very oldMike Bayer2014-02-184-7/+12
| | | | | | | | | | | | (pre 8.1) versions of Postgresql, and potentially other PG engines such as Redshift (assuming Redshift reports the version as < 8.1). The query for "indexes" as well as "primary keys" relies upon inspecting a so-called "int2vector" datatype, which refuses to coerce to an array prior to 8.1 causing failures regarding the "ANY()" operator used in the query. Extensive googling has located the very hacky, but recommended-by-PG-core-developer query to use when PG version < 8.1 is in use, so index and primary key constraint reflection now work on these versions.
* - Added :paramref:`.MetaData.reflect.**dialect_kwargs`Mike Bayer2014-02-021-88/+175
| | | | | | | | | | | | | | | | | | to support dialect-level reflection options for all :class:`.Table` objects reflected. - Added a new dialect-level argument ``postgresql_ignore_search_path``; this argument is accepted by both the :class:`.Table` constructor as well as by the :meth:`.MetaData.reflect` method. When in use against Postgresql, a foreign-key referenced table which specifies a remote schema name will retain that schema name even if the name is present in the ``search_path``; the default behavior since 0.7.3 has been that schemas present in ``search_path`` would not be copied to reflected :class:`.ForeignKey` objects. The documentation has been updated to describe in detail the behavior of the ``pg_get_constraintdef()`` function and how the ``postgresql_ignore_search_path`` feature essentially determines if we will honor the schema qualification reported by this function or not. [ticket:2922]
* - rework the JSON expression system so that "astext" is called *after*Mike Bayer2013-12-271-7/+25
| | | | | | | | | the indexing. this is for more natural operation. - also add cast() to the JSON expression to complement astext. This integrates the CAST call which will be needed frequently. Part of [ticket:2687]. - it's a little unclear how more advanced unicode attribute-access is going to go, some quick attempts at testing yielded strange error messages from psycopg2. - do other cross linking as mentioned in [ticket:2687].
* - make the json serializer and deserializer per-dialect, so that we areMike Bayer2013-12-171-22/+69
| | | | | compatible with psycopg2's per-connection/cursor approach. add round trip tests for both native and non-native.
* this test appears to be failing with pg 9.3, not sure how to restore itMike Bayer2013-12-171-1/+3
|
* - using AssertsCompiledSQL so need __dialect__Mike Bayer2013-12-171-0/+3
|
* - rework JSON expressions to be based off __getitem__ exclusivelyMike Bayer2013-12-171-29/+78
| | | | | | | | | - add support for "standalone" JSON objects; this involves getting CAST to upgrade the given type of a bound parameter. should add a core-only test for this. - add tests for "standalone" json round trips both with and without unicode - add mechanism by which we remove psycopg2's "json" handler in order to get the effect of using our non-native result handlers
* Merge branch 'issue_2581' of github.com:nathan-rice/sqlalchemy into pg_jsonMike Bayer2013-12-171-1/+190
|\
| * sqlalchemy/dialects/postgresql/pgjson:nathan2013-12-111-3/+37
| | | | | | | | | | - Added support for additional operators - Made return as json default (rather than text)
| * sqlalchemy/dialects/postgresql/pgjson:nathan2013-12-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | - Fixed reference to HSTORE - Corrected spelling of SQLAlchemy sqlalchemy/dialects/postgresql/psycopg2: - Added psycopg2 specific wrapper type for JSON which uses inherent json deserialization facilities - Added code to detect and utilize the JSON wrapper if psycopg2 >= 2.5 test/dialect/postgresql/test_types: - removed reference to use_native_hstore
| * sqlalchemy/dialects/postgresql/__init__.py:nathan2013-12-091-1/+156
| | | | | | | | | | | | | | | | | | | | - Added import references to JSON class sqlalchemy/dialects/postgresql/base.py: - Added visitor method for JSON class sqlalchemy/dialects/postgresql/pgjson (new): - JSON class, supports automatic serialization and deserialization of json data, as well as basic json operators.
* | - round trip testMike Bayer2013-12-091-0/+11
| | | | | | | | | | - changelog - some doc rearrangement
* | Adds test to verify tsvector creation.Noufal Ibrahim2013-12-101-1/+2
|/ | | | Signed-off-by: Noufal Ibrahim <noufal@nibrahim.net.in>
* - move additional enum compilation tests to postgresql/test_compiler.pyMike Bayer2013-11-302-26/+26
|
* - Fixed bug where values within an ENUM weren't escaped for singleMike Bayer2013-11-301-0/+16
| | | | | quote signs. Note that this is backwards-incompatible for existing workarounds that manually escape the single quotes. [ticket:2878]
* - add support for specifying tables or entities for "of"Mike Bayer2013-11-281-0/+7
| | | | | - implement Query with_for_update() - rework docs and tests
* - fix up rendering of "of"Mike Bayer2013-11-281-0/+55
| | | | | | - move out tests, dialect specific out of compiler, compiler tests use new API, legacy API tests in test_selecatble - add support for adaptation of ForUpdateArg, alias support in compilers
* - move this test to PG test_reflectionMike Bayer2013-10-252-79/+65
| | | | - don't use locals()
* Merge branch 'master' of github.com:ijl/sqlalchemy into merge_2183Mike Bayer2013-10-251-0/+81
|\
| * PostgreSQL foreign key inspection includes optionsijl2013-10-111-0/+81
| |
* | - Removed a 128-character truncation from the reflection of theMike Bayer2013-10-181-0/+11
| | | | | | | | | | | | server default for a column; this code was original from PG system views which truncated the string for readability. [ticket:2844]
* | - Added support for rendering ``SMALLSERIAL`` when a :class:`.SmallInteger`Mike Bayer2013-10-151-7/+20
| | | | | | | | | | | | type is used on a primary key autoincrement column, based on server version detection of Postgresql version 9.2 or greater. [ticket:2840]
* | Parenthesis will be applied to a compound SQL expression asMike Bayer2013-10-121-1/+12
| | | | | | | | | | rendered in the column list of a CREATE INDEX statement. [ticket:2742]
* | - Fixed bug in default compiler plus those of postgresql, mysql, andMike Bayer2013-10-121-0/+10
|/ | | | | | | | mssql to ensure that any literal SQL expression values are rendered directly as literals, instead of as bound parameters, within a CREATE INDEX statement. [ticket:2742] - don't need expression_as_ddl(); literal_binds and include_table take care of this functionality.
* - put exact version string in the testMike Bayer2013-09-291-3/+2
| | | | - use match with a .* preceding instead of search
* add test for upcoming pullreqMike Bayer2013-09-291-1/+6
|
* - Removed some now unneeded version checks [ticket:2829] courtesy alex gaynorMike Bayer2013-09-221-2/+0
|
* - replace most explicitly-named test objects called "Mock..." withMike Bayer2013-06-301-13/+8
| | | | | | | | | | | | actual mock objects from the mock library. I'd like to use mock for new tests so we might as well use it in obvious places. - use unittest.mock in py3.3 - changelog - add a note to README.unittests - add tests_require in setup.py - have tests import from sqlalchemy.testing.mock - apply usage of mock to one of the event tests. we can be using this approach all over the place.
* set UTC timezone on the connection here so we can get consistent resultsMike Bayer2013-06-291-6/+9
|
* The behavior of :func:`.extract` has been simplified on theMike Bayer2013-06-282-56/+161
| | | | | | | | | Postgresql dialect to no longer inject a hardcoded ``::timestamp`` or similar cast into the given expression, as this interfered with types such as timezone-aware datetimes, but also does not appear to be at all necessary with modern versions of psycopg2. Also in 0.8.2. [ticket:2740]
* refactor test suites for postgresql, mssql, mysql into packages.Mike Bayer2013-06-286-0/+3672