.. seealso::
- `The Schema Search Path
- <http://www.postgresql.org/docs/9.0/static/ddl-schemas.html#DDL-SCHEMAS-PATH>`_
- - on the PostgreSQL website.
+ `The Schema Search Path
+ <http://www.postgresql.org/docs/9.0/static/ddl-schemas.html#DDL-SCHEMAS-PATH>`_
+ - on the PostgreSQL website.
INSERT/UPDATE...RETURNING
-------------------------
)
conn.execute(stmt)
-
* The :paramref:`.Insert.on_conflict_do_update.constraint` argument is
used to specify an index directly rather than inferring it. This can be
the name of a UNIQUE constraint, a PRIMARY KEY constraint, or an INDEX::
.. seealso::
- `INSERT .. ON CONFLICT <http://www.postgresql.org/docs/current/static/sql-insert.html#SQL-ON-CONFLICT>`_ - in the PostgreSQL documentation.
+ `INSERT .. ON CONFLICT
+ <http://www.postgresql.org/docs/current/static/sql-insert.html#SQL-ON-CONFLICT>`_
+ - in the PostgreSQL documentation.
.. _postgresql_match:
.. _postgresql_partial_indexes:
Partial Indexes
-^^^^^^^^^^^^^^^^
+^^^^^^^^^^^^^^^
Partial indexes add criterion to the index definition so that the index is
applied to a subset of rows. These can be specified on :class:`.Index`
Index('my_index', my_table.c.id, postgresql_where=my_table.c.value > 10)
Operator Classes
-^^^^^^^^^^^^^^^^^
+^^^^^^^^^^^^^^^^
PostgreSQL allows the specification of an *operator class* for each column of
an index (see
Index Types
-^^^^^^^^^^^^
+^^^^^^^^^^^
PostgreSQL provides several index types: B-Tree, Hash, GiST, and GIN, as well
as the ability for users to create their own (see
.. _postgresql_table_options:
PostgreSQL Table Options
--------------------------
+------------------------
Several options for CREATE TABLE are supported directly by the PostgreSQL
dialect in conjunction with the :class:`.Table` construct: