summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/postgresql/base.py
Commit message (Collapse)AuthorAgeFilesLines
* Documentation for the new range type support.pr/5Chris Withers2013-06-101-1/+1
|
* Implement EXCLUDE constraints for postgres.Chris Withers2013-06-101-0/+16
|
* Basic type support for the new range types in postgres 9.2Chris Withers2013-06-101-0/+18
|
* Add basic support of unique constraints reflectionpr/4Roman Podolyaka2013-06-091-0/+30
| | | | | | | | | | | | Inspection API already supports reflection of table indexes information and those also include unique constraints (at least for PostgreSQL and MySQL). But it could be actually useful to distinguish between indexes and plain unique constraints (though both are implemented in the same way internally in RDBMS). This change adds a new method to Inspection API - get_unique_constraints() and implements it for SQLite, PostgreSQL and MySQL dialects.
* postgresql testsMike Bayer2013-05-261-20/+16
|
* postgresql dialect testsMike Bayer2013-04-281-13/+12
|
* - the raw 2to3 runMike Bayer2013-04-271-29/+32
| | | | - went through examples/ and cleaned out excess list() calls
* need to test for (list, tuple) here and not hasattr("__iter__")Mike Bayer2013-04-261-1/+4
| | | | since Py3K strings have __iter__
* tweak this some more to handle the array being empty againMike Bayer2013-04-221-5/+3
|
* - change to [ticket:2681], pre-coerce the array to listMike Bayer2013-04-221-16/+6
| | | | unconditonally instead so that it works in all cases.
* The operators for the Postgresql ARRAY type supportsMike Bayer2013-04-221-1/+13
| | | | | | | | | | 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]
* Corrected silly circular import introduced by original "fix".Ben Trofatter2013-03-181-2/+0
|
* Added HSTORE to ischema_names in dialects/postgresql/base.pyBen Trofatter2013-03-181-0/+2
|
* Added support for Postgresql's traditional SUBSTRINGMike Bayer2013-03-091-2/+10
| | | | | | | 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]
* - documentation for any()/all()Mike Bayer2013-01-281-12/+64
|
* Add ANY/ALL construct support for PostgreSQL's ARRAY typeAudrius Kažukauskas2013-01-281-0/+62
|
* Fixing a code block in the PostgreSQL base dialect docstring.Taavi Burns2013-01-251-1/+1
|
* - fix a format issue in the create indexMike Bayer2013-01-171-1/+1
|
* :class:`.Index` now supports arbitrary SQL expressions and/orMike Bayer2013-01-161-11/+11
| | | | | | | | functions, in addition to straight columns. Common modifiers include using ``somecolumn.desc()`` for a descending index and ``func.lower(somecolumn)`` for a case-insensitive index, depending on the capabilities of the target backend. [ticket:695]
* Fixed bug in :func:`.postgresql.array` construct whereby using itMike Bayer2013-01-021-1/+1
| | | | | inside of an :func:`.expression.insert` construct would produce an error regarding a parameter issue in the ``self_group()`` method.
* happy new year (see #2645)Diana Clarke2013-01-011-1/+1
|
* internally at least refer to multirow as "multivalues", to distinguish betweenMike Bayer2012-12-081-1/+1
| | | | | an INSERT that's used in executemany() as opposed to one which has a VALUES clause with multiple entries.
* compiler: add support for multirow insertsIdan Kamara2012-12-061-0/+1
| | | | | | | | | | | | | | | | | | | | | Some databases support this syntax for inserts: INSERT INTO table (id, name) VALUES ('v1', 'v2'), ('v3', 'v4'); which greatly increases INSERT speed. It is now possible to pass a list of lists/tuples/dictionaries as the values param to the Insert construct. We convert it to a flat dictionary so we can continue using bind params. The above query will be converted to: INSERT INTO table (id, name) VALUES (:id, :name), (:id0, :name0); Currently only supported on postgresql, mysql and sqlite.
* Add special containment operation methods for PG array typeAudrius Kažukauskas2012-11-201-3/+39
|
* just a pep8 pass of lib/sqlalchemy/dialects/postgresqlDiana Clarke2012-11-191-62/+86
|
* - hstore adjustmentsMike Bayer2012-11-171-0/+3
|
* - rework the sphinx customizations into distinct modulesMike Bayer2012-10-191-13/+3
| | | | | | | - 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-2/+12
| | | | | | - 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.
* - [bug] Columns in reflected primary key constraintMike Bayer2012-09-231-11/+24
| | | | | | | 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-4/+4
| | | | | - some fixes to the patch to handle empty args, whitespace - changelog clarifies where this API fits at the moment
* remove print statement in PGDialect._get_column_infoÉric Lemoine2012-09-121-1/+0
|
* adjust a comment in PGDialect._get_column_infoÉric Lemoine2012-09-121-2/+2
|
* breaking up PGDialect.get_columns, and add PostGIS column reflection testsÉric Lemoine2012-09-121-102/+109
|
* support for reflecting PostGIS columnsÉric Lemoine2012-09-111-4/+6
|
* Fixed wrong regex pattern -- group vendor nameHong Minhee2012-08-311-1/+1
|
* Version detection of EnterpriseDB (Postgres Plus(R) Advanced Server)Hong Minhee2012-08-311-1/+4
|
* - [feature] The Core oeprator system now includesMike Bayer2012-08-201-9/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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].
* - [feature] To complement [ticket:2547], typesMike Bayer2012-08-171-4/+1
| | | | | | | | | | | | | | | | can now provide "bind expressions" and "column expressions" which allow compile-time injection of SQL expressions into statements on a per-column or per-bind level. This is to suit the use case of a type which needs to augment bind- and result- behavior at the SQL level, as opposed to in the Python level. Allows for schemes like transparent encryption/ decryption, usage of Postgis functions, etc. [ticket:1534] - update postgis example fully. - still need to repair the result map propagation here to be transparent for cases like "labeled column".
* _adapt_expression() moves fully to _DefaultColumnComparator which resumesMike Bayer2012-08-161-3/+4
| | | | | | its original role as stateful, forms the basis of TypeEngine.Comparator. lots of code goes back mostly as it was just with cleaner typing behavior, such as simple flow in _binary_operate now.
* - fix concat() operator, testsMike Bayer2012-08-141-3/+3
| | | | | | | | - [feature] Custom unary operators can now be used by combining operators.custom_op() with UnaryExpression(). - clean up the operator dispatch system and make it more consistent. This does change the compiler contract for custom ops.
* more import cleanupsMike Bayer2012-08-071-4/+4
|
* - [feature] Revised the rules used to determineMike Bayer2012-07-221-101/+102
| | | | | | | | | | | | the operator precedence for the user-defined operator, i.e. that granted using the ``op()`` method. Previously, the smallest precedence was applied in all cases, now the default precedence is zero, lower than all operators except "comma" (such as, used in the argument list of a ``func`` call) and "AS", and is also customizable via the "precedence" argument on the ``op()`` method. [ticket:2537]
* - [feature] Added "MATCH" clause to ForeignKey,Mike Bayer2012-06-211-0/+23
| | | | | | | | | | | | | | 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]
* - [bug] removed unnecessary table clause whenMike Bayer2012-06-161-1/+0
| | | | reflecting enums, [ticket:2510].
* Add some `Sphinx` paragraph level versions informations markups,Mike Bayer2012-06-081-6/+11
| | | | such as ``.. versionadded::``, ``.. versionchanged::`` and ``.. deprecated::``.
* - [bug] removed unnecessary table clauseMike Bayer2012-05-041-1/+0
| | | | | when reflecting domains, [ticket:2473] also in 0.7.7
* - [feature] postgresql.ARRAY features an optionalMike Bayer2012-04-241-39/+50
| | | | | | | | "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]
* - [feature] Inspector.get_primary_keys() isMike Bayer2012-04-241-15/+4
|\ | | | | | | | | | | | | | | deprecated; use Inspector.get_pk_constraint(). Courtesy Diana Clarke. [ticket:2422] - restored default get_primary_keys()/get_pk_constraint() wrapper to help maintain compatibility with third party dialects created against 0.6 or 0.7
| * deprecate inspector.get_primary_keys() in favor of inspector.get_pk_constraint()Diana Clarke2012-04-021-15/+4
| | | | | | | | - see #2422
* | - [removed] The legacy "mutable" system of theMike Bayer2012-04-231-34/+3
|/ | | | | | | | | | | | | | ORM, including the MutableType class as well as the mutable=True flag on PickleType and postgresql.ARRAY has been removed. In-place mutations are detected by the ORM using the sqlalchemy.ext.mutable extension, introduced in 0.7. The removal of MutableType and associated constructs removes a great deal of complexity from SQLAlchemy's internals. The approach performed poorly as it would incur a scan of the full contents of the Session when in use. [ticket:2442]