X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 704429FA32D for ; Wed, 17 May 2006 11:13:06 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 25284-02 for ; Wed, 17 May 2006 11:13:00 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 395B39F9C18 for ; Wed, 17 May 2006 11:12:59 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k4HECqPr019596; Wed, 17 May 2006 10:12:53 -0400 (EDT) To: Niklas Johansson cc: Risto Tamme , pgsql-sql@postgresql.org Subject: Re: Table constraints and INSERT In-reply-to: <4FECA253-3236-4619-B317-765B4CBE9DDD@tele2.se> References: <4FECA253-3236-4619-B317-765B4CBE9DDD@tele2.se> Comments: In-reply-to Niklas Johansson message dated "Wed, 17 May 2006 12:49:38 +0200" Date: Wed, 17 May 2006 10:12:52 -0400 Message-ID: <19595.1147875172@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/121 X-Sequence-Number: 25152 Niklas Johansson writes: > You must cast the integer column to a float or numeric, try: Since the CHECK is expecting an exact result, better use numeric. regards, tom lane