2
对范围内的每个日期运行复杂的查询
我有一张订单表 Column | Type | Modifiers ------------+-----------------------------+----------------------------------------------------- id | integer | not null default nextval('orders_id_seq'::regclass) client_id | integer | not null start_date | date | not null end_date | date | order_type | character varying | not null 数据的client_id具有不重叠的常规,并且在临时数据具有匹配的client_id时,有时会覆盖其start_date上的常规。存在应用程序级别约束,以防止相同类型的订单重叠。 id | client_id | start_date | end_date | order_type ----+-----------+------------+------------+------------ 17 …