summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/postgresql/base.py
Commit message (Collapse)AuthorAgeFilesLines
* - Postgres: Do not prefix table with schema in: "FOR UPDATE of <table>"pr/216Diana Clarke2015-11-241-1/+1
| | | | | | | | | | | | 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
* - Fixed the ``.python_type`` attribute of :class:`.postgresql.INTERVAL`Mike Bayer2015-11-191-0/+6
| | | | | | | | | to return ``datetime.timedelta`` in the same way as that of :obj:`.types.Interval.python_type`, rather than raising ``NotImplementedError``. fixes #3571 (cherry picked from commit 29d6f6e19b014bb5ce79032bd8803e32b4da0e5e)
* - Added support for reflecting the source of materialized viewsMike Bayer2015-11-181-5/+21
| | | | | | to the Postgresql version of the :meth:`.Inspector.get_view_definition` method. fixes #3587
* Updated PostgreSQL links to point to "current" rather than hardcoded versionJeff Widman2015-11-051-2/+2
|
* Update links in SQLAlchemy docs that point to postgres docs to use 'devel' ↵Jeff Widman2015-11-041-2/+2
| | | | rather than hardcoded version
* - add a postgresql-specific form of array_agg() that injects theMike Bayer2015-08-271-0/+5
| | | | ARRAY type, references #3132
* - add PG-specific aggregate_order_by(), references #3132Mike Bayer2015-08-271-0/+6
|
* - build out a new base type for Array, as well as new any/all operatorsMike Bayer2015-08-251-14/+0
| | | | | | - any/all work for Array as well as subqueries, accepted by MySQL - Postgresql ARRAY now subclasses Array - fixes #3516
* - document workaround type for ARRAY of ENUM, fixes #3467Mike Bayer2015-08-181-0/+41
|
* - merge of ticket_3499 indexed access branchMike Bayer2015-08-171-415/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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.
* - An adjustment to the new Postgresql feature of reflecting storageMike Bayer2015-07-241-1/+3
| | | | | | | | | options and USING of :ticket:`3455` released in 1.0.6, to disable the feature for Postgresql versions < 8.2 where the ``reloptions`` column is not provided; this allows Amazon Redshift to again work as it is based on an 8.0.x version of Postgresql. Fix courtesy Pete Hollobon. references #3455
* - add a note, references #3487Mike Bayer2015-07-151-0/+10
|
* - for #3455Mike Bayer2015-06-191-4/+17
| | | | | | | | | - 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-3/+36
|\
| * Add reflection of PostgreSQL index access methods (USING clause)pr/179Pete Hollobon2015-06-041-3/+13
| |
| * Add reflection of PostgreSQL index storage optionsPete Hollobon2015-06-041-3/+9
| |
| * Add support for PostgreSQL index storage parametersPete Hollobon2015-06-031-0/+17
| | | | | | | | | | Add support for specifying PostgreSQL index storage paramters (e.g. fillfactor).
* | - Repaired the :class:`.ExcludeConstraint` construct to support commonMike Bayer2015-06-161-4/+6
|/ | | | | | | 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
* - Fixed support for "literal_binds" mode when using limit/offsetMike Bayer2015-04-231-2/+3
| | | | | | with Firebird, so that the values are again rendered inline when this is selected. Related to :ticket:`3034`. fixes #3381
* - Fixed bug where updated PG index reflection as a result ofMike Bayer2015-04-011-31/+53
| | | | | | | :ticket:`3184` would cause index operations to fail on Postgresql versions 8.4 and earlier. The enhancements are now disabled when using an older version of Postgresql. fixes #3343
* - The Postgresql :class:`.postgresql.ENUM` type will emit aMike Bayer2015-03-111-16/+96
| | | | | | | | | | | | DROP TYPE instruction when a plain ``table.drop()`` is called, assuming the object is not associated directly with a :class:`.MetaData` object. In order to accomodate the use case of an enumerated type shared between multiple tables, the type should be associated directly with the :class:`.MetaData` object; in this case the type will only be created at the metadata level, or if created directly. The rules for create/drop of Postgresql enumerated types have been highly reworked in general. fixes #3319
* - copyright 2015Mike Bayer2015-03-101-1/+1
|
* - changelog and docs for pullreq bitbucket:45Mike Bayer2015-03-101-0/+18
|
* Dialect option `postgresql_concurrently` to `Index` construct.Iuri de Silvio2015-02-251-2/+9
|
* - Added new user-space accessors for viewing transaction isolationMike Bayer2015-01-201-1/+1
| | | | | | | | | levels; :meth:`.Connection.get_isolation_level`, :attr:`.Connection.default_isolation_level`. - enhance documentation inter-linkage between new accessors, existing isolation_level parameters, as well as in the dialect-level methods which should be fully covered by Engine/Connection level APIs now.
* - Custom dialects that implement :class:`.GenericTypeCompiler` canMike Bayer2015-01-161-34/+34
| | | | | | | | | | | | | | now be constructed such that the visit methods receive an indication of the owning expression object, if any. Any visit method that accepts keyword arguments (e.g. ``**kw``) will in most cases receive a keyword argument ``type_expression``, referring to the expression object that the type is contained within. For columns in DDL, the dialect's compiler class may need to alter its ``get_column_specification()`` method to support this as well. The ``UserDefinedType.get_col_spec()`` method will also receive ``type_expression`` if it provides ``**kw`` in its argument signature. fixes #3074
* - Fixed bug where Postgresql dialect would fail to render anMike Bayer2015-01-161-2/+7
| | | | | | | | 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
* - clean up default comparator which doesn't need to be a class,Mike Bayer2015-01-041-5/+6
| | | | get PG stuff working
* correctionsMike Bayer2014-12-271-1/+1
|
* - correctionsMike Bayer2014-12-271-2/+2
| | | | - attempt to add a script to semi-automate the fixing of links
* - The :meth:`.PGDialect.has_table` method will now query againstMike Bayer2014-12-041-1/+2
| | | | | | | | | | | ``pg_catalog.pg_table_is_visible(c.oid)``, rather than testing for an exact schema match, when the schema name is None; this so that the method will also illustrate that temporary tables are present. Note that this is a behavioral change, as Postgresql allows a non-temporary table to silently overwrite an existing temporary table of the same name, so this changes the behavior of ``checkfirst`` in that unusual scenario. fixes #3264
* - use provide_metadata for new unique constraint / index testsMike Bayer2014-10-041-12/+40
| | | | | | | | | | | | | | - add a test for PG reflection of unique index without any unique constraint - for PG, don't include 'duplicates_constraint' in the entry if the index does not actually mirror a constraint - use a distinct method for unique constraint reflection within table - catch unique constraint not implemented condition; this may be within some dialects and also is expected to be supported by Alembic tests - migration + changelogs for #3184 - add individual doc notes as well to MySQL, Postgreql fixes #3184
* Reflect unique constraints when reflecting a Table objectJohannes Erdfelt2014-09-171-5/+13
| | | | | | | | | | | | | | | Calls to reflect a table did not create any UniqueConstraint objects. The reflection core made no calls to get_unique_constraints and as a result, the sqlite dialect would never reflect any unique constraints. MySQL transparently converts unique constraints into unique indexes, but SQLAlchemy would reflect those as an Index object and as a UniqueConstraint. The reflection core will now deduplicate the unique constraints. PostgreSQL would reflect unique constraints as an Index object and as a UniqueConstraint object. The reflection core will now deduplicate the unique indexes.
* - repair get_foreign_table_names() for PGInsp/dialect levelpr128Mike Bayer2014-09-171-16/+31
| | | | | - repair get_view_names() - changelog + migration note
* Merge remote-tracking branch 'origin/pr/128' into pr128Mike Bayer2014-09-161-3/+20
|\
| * Added documentation. Changed my mind - added get_foreign_table_names() only ↵pr/128Rodrigo Menezes2014-09-051-19/+17
| | | | | | | | to PGInspect and not in the Dialect. Added tests for PGInspect and removed a bunch of the old test scaffolding.
| * Added get_foreign_table_names to interface and put it in the test requirements.Rodrigo Menezes2014-09-051-0/+1
| |
| * Fixing some pep8s and adding get_foreign_tables.Rodrigo Menezes2014-09-031-2/+20
| |
| * Removed changes that are no longer necessary for postgresql_relkind. Also, ↵Rodrigo Menezes2014-08-261-2/+2
| | | | | | | | removed newline changes.
| * Merge branch 'master' of https://github.com/zzzeek/sqlalchemy into ↵Rodrigo Menezes2014-08-261-1/+71
| |\ | | | | | | | | | feature/postgres-relkind
| * | Remove relkind from construct arguments.Rodrigo Menezes2014-08-261-2/+1
| | |
| * | Removed all mentions to postgresql_relkindRodrigo Menezes2014-08-261-29/+9
| | |
| * | Add a view synonym too for consistency.Rodrigo Menezes2014-08-141-1/+2
| | |
| * | Merge branch 'master' of https://github.com/rclmenezes/sqlalchemyRodrigo Menezes2014-08-141-21/+70
| |\ \
| * | | Added support for postgres_relkind.Rodrigo Menezes2014-08-141-12/+32
| | | |
* | | | - ensure literal_binds works with LIMIT clause, FOR UPDATEMike Bayer2014-09-031-5/+5
| | | |
* | | | - updates to migration / changelog for 1.0Mike Bayer2014-08-261-1/+1
| |_|/ |/| |
* | | - pep8 formatting for pg table opts feature, testsMike Bayer2014-08-231-24/+59
| | | | | | | | | | | | | | | | | | | | | - add support for PG INHERITS - fix mis-named tests - changelog fixes #2051
* | | Adding postgres create table options documentationpr/129Malik Diarra2014-08-171-0/+16
| | |
* | | Correcting options name from withoids to with_oidsMalik Diarra2014-08-171-3/+3
| | |