summaryrefslogtreecommitdiff
path: root/test/dialect/postgresql/test_compiler.py
Commit message (Collapse)AuthorAgeFilesLines
* Add postgresql tablespace option on indexpr/233beenje2016-02-031-0/+43
| | | | | postgresql_tablespace option was already supported on table but not on index.
* - Multi-tenancy schema translation for :class:`.Table` objects is added.Mike Bayer2016-01-081-0/+18
| | | | | | | | | This supports the use case of an application that uses the same set of :class:`.Table` objects in many schemas, such as schema-per-user. A new execution option :paramref:`.Connection.execution_options.schema_translate_map` is added. fixes #2685 - latest tox doesn't like the {posargs} in the profile rerunner
* Merge remote-tracking branch 'origin/pr/216'Mike Bayer2015-11-301-0/+16
|\
| * - Postgres: Do not prefix table with schema in: "FOR UPDATE of <table>"pr/216Diana Clarke2015-11-241-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | For example, this query: SELECT s1.users.name FROM s1.users FOR UPDATE OF s1.users should actually be: SELECT s1.users.name FROM s1.users FOR UPDATE OF users fixes #3573
* | fix postgresql exclude contraint to check when= against None rather than ↵pr/215aisch2015-11-231-0/+13
|/ | | | __bool__ eval
* - add PG-specific aggregate_order_by(), references #3132Mike Bayer2015-08-271-1/+45
|
* - Added support for "set-aggregate" functions of the formticket_3516Mike Bayer2015-08-261-1/+1
| | | | | | | | | | | ``<function> WITHIN GROUP (ORDER BY <criteria>)``, using the method :class:`.FunctionElement.within_group`. A series of common set-aggregate functions with return types derived from the set have been added. This includes functions like :class:`.percentile_cont`, :class:`.dense_rank` and others. fixes #1370 - make sure we use func.name for all _literal_as_binds in functions.py so we get consistent naming behavior for parameters.
* - merge of ticket_3499 indexed access branchMike Bayer2015-08-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - The "hashable" flag on special datatypes such as :class:`.postgresql.ARRAY`, :class:`.postgresql.JSON` and :class:`.postgresql.HSTORE` is now set to False, which allows these types to be fetchable in ORM queries that include entities within the row. fixes #3499 - The Postgresql :class:`.postgresql.ARRAY` type now supports multidimensional indexed access, e.g. expressions such as ``somecol[5][6]`` without any need for explicit casts or type coercions, provided that the :paramref:`.postgresql.ARRAY.dimensions` parameter is set to the desired number of dimensions. fixes #3487 - The return type for the :class:`.postgresql.JSON` and :class:`.postgresql.JSONB` when using indexed access has been fixed to work like Postgresql itself, and returns an expression that itself is of type :class:`.postgresql.JSON` or :class:`.postgresql.JSONB`. Previously, the accessor would return :class:`.NullType` which disallowed subsequent JSON-like operators to be used. part of fixes #3503 - The :class:`.postgresql.JSON`, :class:`.postgresql.JSONB` and :class:`.postgresql.HSTORE` datatypes now allow full control over the return type from an indexed textual access operation, either ``column[someindex].astext`` for a JSON type or ``column[someindex]`` for an HSTORE type, via the :paramref:`.postgresql.JSON.astext_type` and :paramref:`.postgresql.HSTORE.text_type` parameters. also part of fixes #3503 - The :attr:`.postgresql.JSON.Comparator.astext` modifier no longer calls upon :meth:`.ColumnElement.cast` implicitly, as PG's JSON/JSONB types allow cross-casting between each other as well. Code that makes use of :meth:`.ColumnElement.cast` on JSON indexed access, e.g. ``col[someindex].cast(Integer)``, will need to be changed to call :attr:`.postgresql.JSON.Comparator.astext` explicitly. This is part of the refactor in references #3503 for consistency in operator use.
* - for #3455Mike Bayer2015-06-191-7/+5
| | | | | | | | | - changelog - versionadded + reflink for new pg storage parameters doc - pep8ing - add additional tests to definitely check that the Index object is created all the way with the opts we want fixes #3455
* Merge remote-tracking branch 'origin/pr/179' into pr179Mike Bayer2015-06-191-0/+24
|\
| * Add support for PostgreSQL index storage parametersPete Hollobon2015-06-031-0/+24
| | | | | | | | | | Add support for specifying PostgreSQL index storage paramters (e.g. fillfactor).
* | - Repaired the :class:`.ExcludeConstraint` construct to support commonMike Bayer2015-06-161-3/+43
|/ | | | | | | features that other objects like :class:`.Index` now do, that the column expression may be specified as an arbitrary SQL expression such as :obj:`.cast` or :obj:`.text`. fixes #3454
* Dialect option `postgresql_concurrently` to `Index` construct.Iuri de Silvio2015-02-251-0/+10
|
* - Fixed bug where Postgresql dialect would fail to render anMike Bayer2015-01-161-1/+53
| | | | | | | | expression in an :class:`.Index` that did not correspond directly to a table-bound column; typically when a :func:`.text` construct was one of the expressions within the index; or could misinterpret the list of expressions if one or more of them were such an expression. fixes #3174
* - pep8 formatting for pg table opts feature, testsMike Bayer2014-08-231-22/+73
| | | | | | | - add support for PG INHERITS - fix mis-named tests - changelog fixes #2051
* Correcting options name from withoids to with_oidsMalik Diarra2014-08-171-3/+3
|
* quoting tablespace name in create table command in postgresql dialectMalik Diarra2014-08-171-0/+5
|
* Adding oids and on_commit table optionsMalik Diarra2014-08-171-0/+22
|
* Adding a tablespace options for postgresql create tableMalik Diarra2014-08-171-0/+6
|
* - Fixed bug in :class:`.postgresql.array` object where comparisonMike Bayer2014-07-251-0/+10
| | | | | to a plain Python list would fail to use the correct array constructor. Pull request courtesy Andrew. fixes #3141
* - flake8 all of test/dialect/postgresqlMike Bayer2014-07-251-134/+151
| | | | - add __backend__ to most tests so that pg8000 can start coming in
* - add postgresql_regconfig argument to PG dialect for match() operator,jonathan vanasco2014-07-081-0/+81
| | | | implements PG's to_tsquery('regconfig', 'arg') pattern. fixes #3078
* - 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
|
* - Support has been added for pytest to run tests. This runnerMike Bayer2014-03-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* - move additional enum compilation tests to postgresql/test_compiler.pyMike Bayer2013-11-301-1/+25
|
* - 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
* 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.
* The behavior of :func:`.extract` has been simplified on theMike Bayer2013-06-281-55/+0
| | | | | | | | | 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-281-0/+589