summaryrefslogtreecommitdiff
path: root/test/dialect/test_postgresql.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix unicode literals on Python 3.1 and 3.2pr/10Roman Podolyaka2013-06-231-8/+8
| | | | | A few tests use u'' unicode literals which are not supported in Python versions 3.1 and 3.2.
* this locale is not needed. maybe it is somewhere but the locale I have ↵Mike Bayer2013-06-221-13/+9
| | | | | | ("C", whatever that means, cannot find meaning of this anywhere in Postgresql documentation) seems to work
* Merge pull request #5 from cjw296/pg-rangesmike bayer2013-06-221-1/+329
|\ | | | | Support for Postgres range types.
| * Implement EXCLUDE constraints for postgres.Chris Withers2013-06-101-1/+49
| |
| * add support for range operators listed in ↵Chris Withers2013-06-101-1/+159
| | | | | | | | http://www.postgresql.org/docs/9.2/interactive/functions-range.html
| * Basic type support for the new range types in postgres 9.2Chris Withers2013-06-101-1/+123
| |
* | Add AUTOCOMMIT isolation level support for psycopg2pr/7Roman Podolyaka2013-06-151-0/+10
|/ | | | | | | | | | | | | | One can use this to emit statements, which can not be executed within a transaction (e. g. CREATE DATABASE): from sqlalchemy import create_engine eng = create_engine('postgresql://test:test@localhost/test') conn = eng.connect().execution_options(isolation_level='AUTOCOMMIT') conn.execute('CREATE DATABASE test2;') Fixes issue #2072.
* - repair for py3kMike Bayer2013-05-291-2/+2
| | | | - fix test
* hstores are text, and in py3k they seem to be implcitly unicode. soMike Bayer2013-05-291-0/+25
| | | | | add unicode encoding for py2k for the non-native hstore, pullreq for native psycopg2 support coming....
* postgresql testsMike Bayer2013-05-261-6/+6
|
* Merge branch 'master' into rel_0_9Mike Bayer2013-05-261-0/+1
|\
| * Add missing import that caused test_notice_logging to fail if this suite was ↵Chris Withers2013-05-261-0/+1
| | | | | | | | run on its own.
* | postgresql dialect testsMike Bayer2013-04-281-29/+30
| |
* | - the raw 2to3 runMike Bayer2013-04-271-22/+22
|/ | | | - went through examples/ and cleaned out excess list() calls
* tweak this some more to handle the array being empty againMike Bayer2013-04-221-0/+11
|
* - change to [ticket:2681], pre-coerce the array to listMike Bayer2013-04-221-10/+3
| | | | unconditonally instead so that it works in all cases.
* The operators for the Postgresql ARRAY type supportsMike Bayer2013-04-221-60/+106
| | | | | | | | | | input types of sets, generators, etc. but only when a dimension is specified for the ARRAY; otherwise, the dialect needs to peek inside of "arr[0]" to guess how many dimensions are in use. If this occurs with a non list/tuple type, the error message is now informative and directs to specify a dimension for the ARRAY. [ticket:2681]
* - establish ordering here for the hstore repr testMike Bayer2013-04-201-4/+5
|
* 0.8.1 bump + test, changelog for hstore fix [ticket:2680]Mike Bayer2013-03-181-0/+6
|
* Added support for Postgresql's traditional SUBSTRINGMike Bayer2013-03-091-0/+8
| | | | | | | function syntax, renders as "SUBSTRING(x FROM y FOR z)" when regular ``func.substring()`` is used. Also in 0.7.11. Courtesy Gunnlaugur Por Briem. [ticket:2676]
* - remove all compat items that are pre-2.5 (hooray)Mike Bayer2013-03-091-3/+2
| | | | | | - other cleanup - don't need compat.decimal, that approach never panned out. hopefully outside libs aren't pulling it in, they shouldn't be
* Add ANY/ALL construct support for PostgreSQL's ARRAY typeAudrius Kažukauskas2013-01-281-1/+49
|
* - "postgres_where" has been removedMike Bayer2013-01-161-11/+0
|
* Fixed bug in :func:`.postgresql.array` construct whereby using itMike Bayer2013-01-021-0/+9
| | | | | inside of an :func:`.expression.insert` construct would produce an error regarding a parameter issue in the ``self_group()`` method.
* - multivalued inserts, [ticket:2623]Mike Bayer2012-12-081-25/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - update "not supported" messages for empty inserts, mutlivalue inserts - rework the ValuesBase approach for multiple value sets so that stmt.parameters does store a list for multiple values; the _has_multiple_parameters flag now indicates which of the two modes the statement is within. it now raises exceptions if a subsequent call to values() attempts to call a ValuesBase with one mode in the style of the other mode; that is, you can't switch a single- or multi- valued ValuesBase to the other mode, and also if a multiple value is passed simultaneously with a kwargs set. Added tests for these error conditions - Calling values() multiple times in multivalue mode now extends the parameter list to include the new parameter sets. - add error/test if multiple *args were passed to ValuesBase.values() - rework the compiler approach for multivalue inserts, back to where _get_colparams() returns the same list of (column, value) as before, thereby maintaining the identical number of append() and other calls when multivalue is not enabled. In the case of multivalue, it makes a last-minute switch to return a list of lists instead of the single list. As it constructs the additional lists, the inline defaults and other calculated default parameters of the first parameter set are copied into the newly generated lists so that these features continue to function for a multivalue insert. Multivalue inserts now add no additional function calls to the compilation for regular insert constructs. - parameter lists for multivalue inserts now includes an integer index for all parameter sets. - add detailed documentation for ValuesBase.values(), including careful wording to describe the difference between multiple values and an executemany() call. - add a test for multivalue insert + returning - it works ! - remove the very old/never used "postgresql_returning"/"firebird_returning" flags.
* HSTORE.comparator_factory should subclass Concatenable.ComparatorAudrius Kažukauskas2012-11-211-2/+4
|
* Add special containment operation methods for PG array typeAudrius Kažukauskas2012-11-201-12/+69
|
* another hide from 2to3 testMike Bayer2012-11-181-1/+2
|
* Fixed a gotcha where inadvertently calling list() on aMike Bayer2012-11-181-1/+2
| | | | | | :class:`.ColumnElement` would go into an endless loop, if :meth:`.ColumnOperators.__getitem__` were implemented. A new NotImplementedError is emitted via ``__iter__()``.
* - hstore documentation, migrationMike Bayer2012-11-171-3/+37
| | | | - don't need a custom exception here, just use ValueError
* - hstore adjustmentsMike Bayer2012-11-171-0/+128
|
* Add PostgreSQL HStore type supportAudrius Kažukauskas2012-11-131-1/+191
|
* pg and oracle fixesMike Bayer2012-09-301-1/+1
|
* trying different approaches to test layout. in this one, the testing modulesMike Bayer2012-09-271-8/+13
| | | | | | | become an externally usable package but still remains within the main sqlalchemy parent package. in this system, we use kind of an ugly hack to get the noseplugin imported outside of the "sqlalchemy" package, while still making it available within sqlalchemy for usage by third party libraries.
* - [bug] Columns in reflected primary key constraintMike Bayer2012-09-231-0/+15
| | | | | | | are now returned in the order in which the constraint itself defines them, rather than how the table orders them. Courtesy Gunnlaugur Por Briem. [ticket:2531].
* - genericize the test for ischema_namesMike Bayer2012-09-161-36/+31
| | | | | - some fixes to the patch to handle empty args, whitespace - changelog clarifies where this API fits at the moment
* breaking up PGDialect.get_columns, and add PostGIS column reflection testsÉric Lemoine2012-09-121-0/+49
|
* Add a version test for EnterpriseDBHong Minhee2012-08-311-1/+4
|
* - [feature] The Query.update() method is nowMike Bayer2012-08-201-0/+3
| | | | | | | | | | | | | | | | | more lenient as to the table being updated. Plain Table objects are better supported now, and additional a joined-inheritance subclass may be used with update(); the subclass table will be the target of the update, and if the parent table is referenced in the WHERE clause, the compiler will call upon UPDATE..FROM syntax as allowed by the dialect to satisfy the WHERE clause. Target columns must still be in the target table i.e. does not support MySQL's multi-table update feature (even though this is in Core). PG's DELETE..USING is also not available in Core yet.
* - [feature] The Core oeprator system now includesMike Bayer2012-08-201-3/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the `getitem` operator, i.e. the bracket operator in Python. This is used at first to provide index and slice behavior to the Postgresql ARRAY type, and also provides a hook for end-user definition of custom __getitem__ schemes which can be applied at the type level as well as within ORM-level custom operator schemes. Note that this change has the effect that descriptor-based __getitem__ schemes used by the ORM in conjunction with synonym() or other "descriptor-wrapped" schemes will need to start using a custom comparator in order to maintain this behavior. - [feature] postgresql.ARRAY now supports indexing and slicing. The Python [] operator is available on all SQL expressions that are of type ARRAY; integer or simple slices can be passed. The slices can also be used on the assignment side in the SET clause of an UPDATE statement by passing them into Update.values(); see the docs for examples. - [feature] Added new "array literal" construct postgresql.array(). Basically a "tuple" that renders as ARRAY[1,2,3].
* -whitespace bonanza, contdMike Bayer2012-07-281-45/+45
|
* - [feature] Added "MATCH" clause to ForeignKey,Mike Bayer2012-06-211-0/+50
| | | | | | | | | | | | | | ForeignKeyConstraint, courtesy Ryan Kelly. [ticket:2502] - [feature] Added support for DELETE and UPDATE from an alias of a table, which would assumedly be related to itself elsewhere in the query, courtesy Ryan Kelly. [ticket:2507] - [feature] Added support for the Postgresql ONLY keyword, which can appear corresponding to a table in a SELECT, UPDATE, or DELETE statement. The phrase is established using with_hint(). Courtesy Ryan Kelly [ticket:2506]
* adjust some test exclusionsMike Bayer2012-04-241-19/+2
|
* - [feature] postgresql.ARRAY features an optionalMike Bayer2012-04-241-61/+38
| | | | | | | | "dimension" argument, will assign a specific number of dimensions to the array which will render in DDL as ARRAY[][]..., also improves performance of bind/result processing. [ticket:2441]
* revert this, bad ideaMike Bayer2012-02-131-12/+0
|
* - [bug] Fixed the "render literal bind" function,Mike Bayer2012-02-131-0/+12
| | | | used by Alembic, to escape % signs with %%.
* - [feature] Dialect-specific compilers now raiseMike Bayer2012-01-281-2/+2
| | | | | | | | CompileException for all type/statement compilation issues, instead of InvalidRequestError or ArgumentError. The DDL for CREATE TABLE will re-raise CompileExceptions to include table/column information for the problematic column. [ticket:2361]
* - [feature] Added create_type constructor argumentMike Bayer2011-11-281-0/+18
| | | | | | | | | to pg.ENUM. When False, no CREATE/DROP or checking for the type will be performed as part of a table create/drop event; only the create()/drop)() methods called directly will do this. Helps with Alembic "offline" scripts.
* - [bug] Postgresql dialect memoizes that an ENUM of aMike Bayer2011-10-291-0/+24
| | | | | | | | | particular name was processed during a create/drop sequence. This allows a create/drop sequence to work without any calls to "checkfirst", and also means with "checkfirst" turned on it only needs to check for the ENUM once. [ticket:2311]
* - Added client_encoding parameter to create_engine()Mike Bayer2011-10-151-0/+19
| | | | | | when the postgresql+psycopg2 dialect is used; calls the psycopg2 set_client_encoding() method with the value upon connect. [ticket:1839]