On Fri, Jan 4, 2019 at 2:27 PM Adrian Klaver <adrian.kla...@aklaver.com> wrote:
> On 1/4/19 2:21 PM, Ken Tanzer wrote: > > > > I've tried various ways of getting to a date (::date, LEFT(x,10)::date, > > etc.), but all of them throw the error "functions in index expression > > must be marked IMMUTABLE." > > ?: > '2014-10-23T00:00:00'::timestamp > > Can you also show the actual index expression? > > Here's a few of the ones I tried: ag_reach=> CREATE INDEX ON export_hch_encounter_history (CAST("Service_Date" AS date)); ERROR: functions in index expression must be marked IMMUTABLE ag_reach=> CREATE INDEX ON export_hch_encounter_history (CAST(LEFT("Service_Date",10) AS date)); ERROR: functions in index expression must be marked IMMUTABLE ag_reach=> CREATE INDEX ON export_hch_encounter_history (CAST("Service_Date"::timestamp AS date)); ERROR: functions in index expression must be marked IMMUTABLE ag_reach=> CREATE INDEX ON export_hch_encounter_history (("Service_Date"::date)); ERROR: functions in index expression must be marked IMMUTABLEag_reach=> CREATE INDEX ON export_hch_encounter_history ((LEFT("Service_Date",10)::date)); ERROR: functions in index expression must be marked IMMUTABLE -- AGENCY Software A Free Software data system By and for non-profits *http://agency-software.org/ <http://agency-software.org/>* *https://demo.agency-software.org/client <https://demo.agency-software.org/client>* ken.tan...@agency-software.org (253) 245-3801 Subscribe to the mailing list <agency-general-requ...@lists.sourceforge.net?body=subscribe> to learn more about AGENCY or follow the discussion.