crash on cash_words('21,474,836.48'::money) - Mailing list pgsql-bugs

From Eugene Pervago
Subject crash on cash_words('21,474,836.48'::money)
Date
Msg-id 1013982335.14218.1.camel@localhost
Whole thread Raw
Responses Re: crash on cash_words('21,474,836.48'::money)
List pgsql-bugs
============================================================================
                        POSTGRESQL BUG REPORT TEMPLATE
============================================================================


Your name        :    Eugene Pervago
Your email address    : eugene@ulkatech.com


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

  Operating System (example: Linux 2.0.26 ELF)     : Linux 2.4.17

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

  Compiler used (example:  gcc 2.95.2)        : gcc 2.96 (Mandrake Cooker RPM)


Please enter a FULL description of your problem:
------------------------------------------------
Executing "select cash_words('21,474,836.48'::money);" (number in cents is 2^31)
consistently crashes the server. Using any number above that returns in negative
results (minus ....) because of the wraparound, using any number below is fine.


Please describe a way to repeat the problem.   Please try to provide a
concise reproducible example, if at all possible:
----------------------------------------------------------------------
1. select cash_words('21,474,836.48'::money);
2. Crashes.


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

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Compiling error
Next
From: Tom Lane
Date:
Subject: Re: Possible Bug