Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id A12522E34EF for ; Sat, 5 Jan 2008 14:09:01 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 91291-02 for ; Sat, 5 Jan 2008 14:08:58 -0400 (AST) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id D292A2E32DD for ; Sat, 5 Jan 2008 14:08:57 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id m05I8sRa007193; Sat, 5 Jan 2008 13:08:54 -0500 (EST) To: Bruce Momjian cc: PostgreSQL-documentation , Simon Riggs Subject: Re: Partitioning documentation example In-reply-to: <200801051737.m05HbWC08088@momjian.us> References: <200801051737.m05HbWC08088@momjian.us> Comments: In-reply-to Bruce Momjian message dated "Sat, 05 Jan 2008 12:37:32 -0500" Date: Sat, 05 Jan 2008 13:08:54 -0500 Message-ID: <7192.1199556534@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/7 X-Sequence-Number: 4736 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. regards, tom lane