Skip site navigation (1) Skip section navigation (2)

column check constraint

From: Michael Nguyen <mikeetn(at)yahoo(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: column check constraint
Date: 2001-06-07 19:12:56
Message-ID: 20010607191256.20286.qmail@web14602.mail.yahoo.com (view raw or flat)
Thread:
Lists: pgsql-bugs
============================================================================
                        POSTGRESQL BUG REPORT TEMPLATE
============================================================================


Your name		:	Mike Nguyen	
Your email address	:   mikeetn(at)yahoo(dot)com


System Configuration
---------------------
  Architecture (example: Intel Pentium)  	:        
Intel Pentium

  Operating System (example: Linux 2.0.26 ELF) 	:   NT
4.0 sp6

  PostgreSQL version (example: PostgreSQL-7.1.1):  
PostgreSQL-7.1.2

  Compiler used (example:  gcc 2.95.2)		:   gcc


Please enter a FULL description of your problem:
------------------------------------------------

The following SQL statement fails to run because of
the check constraint
(num >= 0.0).  It runs fine in Oracle sqlplus.

> create table test (
num numeric (10, 2) check (num
>= 0.0 and num <= 100.0)
)
Error: ERROR:  Unable to identify an operator '>=' for
types 'numeric' and 'float8'
	You will have to retype this query using an explicit
cast


Please describe a way to repeat the problem.   Please
try to provide a
concise reproducible example, if at all possible: 
----------------------------------------------------------------------





If you know how this problem might be fixed, list the
solution below:
---------------------------------------------------------------------

The work around is to modify the constraint (num >= 0)



__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

pgsql-bugs by date

Next:From: Arcady GenkinDate: 2001-06-07 22:02:53
Subject: REPOST: redefining location of the socket file /tmp/.s.PGSQL.5432
Previous:From: pgsql-bugsDate: 2001-06-07 15:18:03
Subject: SELECT on VIEW returns wrong result, Buffer Leak

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group