summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/postgresql/base.py
Commit message (Collapse)AuthorAgeFilesLines
* sqlalchemy/dialects/postgresql/__init__.py:nathan2013-12-091-0/+3
| | | | | | | | | | - 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.
* - Fixed bug where values within an ENUM weren't escaped for singleMike Bayer2013-11-301-1/+3
| | | | | quote signs. Note that this is backwards-incompatible for existing workarounds that manually escape the single quotes. [ticket:2878]
* - add support for bindparam() called from AsFromTextMike Bayer2013-11-291-13/+16
| | | | | - get PG dialect to work around "no nonexistent binds" rule for now, though we might want to reconsider this behavior
* - add support for specifying tables or entities for "of"Mike Bayer2013-11-281-2/+3
| | | | | - implement Query with_for_update() - rework docs and tests
* - fix up rendering of "of"Mike Bayer2013-11-281-4/+4
| | | | | | - 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
* - work in progress, will squashMike Bayer2013-11-281-28/+16
|
* added LockmodeArgspr/42Mario Lassnig2013-11-281-9/+21
|
* added ORM supportMario Lassnig2013-11-141-8/+16
|
* add psql FOR UPDATE OF functionalityMario Lassnig2013-11-121-0/+2
|
* - Fixed bug where index reflection would mis-interpret indkey valuesMike Bayer2013-10-271-1/+4
| | | | | | when using the pypostgresql adapter, which returns these values as lists vs. psycopg2's return type of string. [ticket:2855]
* Merge branch 'master' of github.com:ijl/sqlalchemy into merge_2183Mike Bayer2013-10-251-5/+24
|\
| * PostgreSQL foreign key inspection includes optionsijl2013-10-111-5/+24
| |
* | - The typing system now handles the task of rendering "literal bind" values,Mike Bayer2013-10-201-9/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | e.g. values that are normally bound parameters but due to context must be rendered as strings, typically within DDL constructs such as CHECK constraints and indexes (note that "literal bind" values become used by DDL as of :ticket:`2742`). A new method :meth:`.TypeEngine.literal_processor` serves as the base, and :meth:`.TypeDecorator.process_literal_param` is added to allow wrapping of a native literal rendering method. [ticket:2838] - enhance _get_colparams so that we can send flags like literal_binds into INSERT statements - add support in PG for inspecting standard_conforming_strings - add a new series of roundtrip tests based on INSERT of literal plus SELECT for basic literal rendering in dialect suite
* | - Removed a 128-character truncation from the reflection of theMike Bayer2013-10-181-2/+1
| | | | | | | | | | | | 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-1/+11
| | | | | | | | | | | | 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/+4
| | | | | | | | | | 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-9/+8
|/ | | | | | | | 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-2/+2
| | | | - use match with a .* preceding instead of search
* re.match to re.searchpr/26Scott Schaefer2013-09-061-1/+1
| | | | | Convert to re.search to eliminate the restriction on only matching the beginning of the string
* - A rework to the way that "quoted" identifiers are handled, in thatMike Bayer2013-08-271-4/+4
| | | | | | | | | | | | | | | | instead of relying upon various ``quote=True`` flags being passed around, these flags are converted into rich string objects with quoting information included at the point at which they are passed to common schema constructs like :class:`.Table`, :class:`.Column`, etc. This solves the issue of various methods that don't correctly honor the "quote" flag such as :meth:`.Engine.has_table` and related methods. The :class:`.quoted_name` object is a string subclass that can also be used explicitly if needed; the object will hold onto the quoting preferences passed and will also bypass the "name normalization" performed by dialects that standardize on uppercase symbols, such as Oracle, Firebird and DB2. The upshot is that the "uppercase" backends can now work with force-quoted names, such as lowercase-quoted names and new reserved words. [ticket:2812]
* The behavior of :func:`.extract` has been simplified on theMike Bayer2013-06-281-22/+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]
* Fix indexes reflection in PostgreSQLpr/13Roman Podolyaka2013-06-261-14/+18
| | | | | | Reflection of indexes must preserve the order of columns. Fixes issue 2767.
* Fix unique constraints reflection in PostgreSQLpr/11Roman Podolyaka2013-06-231-9/+16
| | | | Reflection of unique constraints must preserve the order of columns.
* Merge pull request #5 from cjw296/pg-rangesmike bayer2013-06-221-1/+35
|\ | | | | Support for Postgres range types.
| * 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
| |
* | fix up the isolation level docs which were a messMike Bayer2013-06-171-9/+25
| |
* | - changelogMike Bayer2013-06-151-2/+3
|/ | | | - docs
* 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
|