Query unable to utilize index without typecast to fixed length character

2023-04-06 Thread ahi
Hello, We have encountered an unexpected quirk with our DB and we are unsure if this is expected behaviour or an issue. PG version PostgreSQL 14.3 on aarch64-unknown-linux-gnu, compiled by aarch64-unknown-linux-gnu-gcc (GCC) 7.4.0, 64-bit schema of table in question and related indexes CREATE

Re: Query unable to utilize index without typecast to fixed length character

2023-04-06 Thread Tom Lane
ahi writes: > CREATE TABLE public.marketplace_sale ( > log_index integer NOT NULL, > created_at timestamp with time zone DEFAULT now() NOT NULL, > updated_at timestamp with time zone DEFAULT now() NOT NULL, > block_timestamp timestamp with time zone NOT NULL, > block bigint NOT