Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 6322E2E372F for ; Sat, 5 Jan 2008 15:01:21 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 67951-09 for ; Sat, 5 Jan 2008 15:01:17 -0400 (AST) Received: from momjian.us (momjian.us [70.90.9.53]) by postgresql.org (Postfix) with ESMTP id 0BE8D2E346F for ; Sat, 5 Jan 2008 15:01:16 -0400 (AST) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id m05J1GR27373; Sat, 5 Jan 2008 14:01:16 -0500 (EST) From: Bruce Momjian Message-Id: <200801051901.m05J1GR27373@momjian.us> Subject: Re: Partitioning documentation example In-Reply-To: <7192.1199556534@sss.pgh.pa.us> To: Tom Lane Date: Sat, 5 Jan 2008 14:01:16 -0500 (EST) CC: PostgreSQL-documentation , Simon Riggs X-Mailer: ELM [version 2.4ME+ PL124 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/8 X-Sequence-Number: 4737 Tom Lane wrote: > Bruce Momjian writes: > > Because my EXECUTE example didn't work I have created a new example > > using date_trunc(), which I think is less error-prone than the > > comparisons done in the original example: > > This is not an improvement either. You can't represent the check > constraints that way (at least not if you want the planner to do > constraint exclusion with them) and I don't think it's "less > error-prone" to have a different representation in the trigger than > you have in the constraints. I see, so date_trunc() can't be used for constraint exclusion in the CHECK constraint, and the trigger should match; makes sense. -- Bruce Momjian http://momjian.us EnterpriseDB http://postgres.enterprisedb.com + If your life is a hard drive, Christ can be your backup. +