2
我想設置一個合併函數,而不是一列上的表的索引。我使用PostgreSQL和我想實現這樣的:SQLAlchemy設置索引合併
create index t on tbl using btree (coalesce(ts_updated, '2002-08-08'))
任何人都知道我怎麼能與SQLAlchemy的的ORM框架,實現這一目標?
我想設置一個合併函數,而不是一列上的表的索引。我使用PostgreSQL和我想實現這樣的:SQLAlchemy設置索引合併
create index t on tbl using btree (coalesce(ts_updated, '2002-08-08'))
任何人都知道我怎麼能與SQLAlchemy的的ORM框架,實現這一目標?
SQLAlchemy不支持在索引定義中的表達,但它是一個planned feature。現在你必須使用custom DDL (see examples in documentation)。