Dynamic queries for Partitions - Mailing list pgsql-sql

From Metatrader EA
Subject Dynamic queries for Partitions
Date
Msg-id CAJNXAk2G_UBPXdji3bwRyDSPGJHms10wBC-jZ80PSm30tWGaZg@mail.gmail.com
Whole thread Raw
Responses Re: Dynamic queries for Partitions
List pgsql-sql
Hi,

When I run one query on one partitioned table.

Select * from customer where opendate = (date_trunc('month', current_date)+'11 days'::interval)::date ;

This query will do that postgres will check all my partitions.

How can I do ?

Step 1 generate one sql that will be like "Select * from customer where opendate = '2016-11-01' ;

Step 2 :: Then run code from step1.

Any advice?

//Bill

pgsql-sql by date:

Previous
From: Michael Moore
Date:
Subject: Re: Only target lines of text
Next
From: Jan Ostrochovsky
Date:
Subject: Re: Dynamic queries for Partitions