Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

dbtoyaml loops on a functional index with two EXTRACT's #44

Closed
jmafc opened this Issue · 0 comments

1 participant

@jmafc
Owner

Given the following table and index:

CREATE TABLE tbl (
    dt date);
CREATE INDEX idx ON tbl (
    EXTRACT(MONTH FROM dt), EXTRACT(DAY FROM dt));

dbtoyaml goes into a loop around line 146 of pyrseas/dbobject/index.py, method _from_catalog of class IndexDict.

@jmafc jmafc closed this issue from a commit
@jmafc jmafc Correct parsing of pg_get_expr index expressions. Fixes #44.
 * pyrseas/dbobject/index.py (split_exprs): New helper function to
   implement the parsing.  (Index._from_catalog): Replace existing
   code by call to split_exprs.
 * tests/dbobject/test_index.py
   (IndexToMapTestCase.test_index_function_multi): Rename to
   test_index_function_complex and replace existing indexes by more
   complex versions, using substring/position and extract from date.
2a7cf5a
@jmafc jmafc closed this in 2a7cf5a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.