Re: DECIMAL NULL value

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: xavierb(at)benon(dot)com, pgsql-bugs(at)postgresql(dot)org
Subject: Re: DECIMAL NULL value
Date: 2001-04-30 02:29:57
Message-ID: 200104300229.f3U2Tvl04386@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

With 7.1 I get:

test=> CREATE TABLE test (price DECIMAL(9,2));
CREATE
test=> INSERT INTO test VALUES ('NULL');
ERROR: Bad numeric input format 'NULL'

> Xavier Bergade (xavierb(at)benon(dot)com) reports a bug with a severity of 2
> The lower the number the more severe it is.
>
> Short Description
> DECIMAL NULL value
>
> Long Description
> Version: 7.0.3
> Platform: Intel 586, 512 megs RAM
>
> CREATE TABLE test (price DECIMAL(9,2));
> INSERT INTO test VALUES ('NULL');
>
> Will crash the backend, anytime.
>
> It should come with a message:
> ERROR: Bad numeric input format 'NULL'
>
> Anything instead of 'NULL' will correctly report the error without crashing.
>
> Sample Code
> CREATE TABLE test (price DECIMAL(9,2));
> INSERT INTO test VALUES ('NULL');
>
>
> No file was uploaded with this report
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message pgsql-bugs 2001-04-30 05:37:53 Inheritance of functions shows unexpected behaviour
Previous Message pgsql-bugs 2001-04-30 01:52:05 DECIMAL NULL value