crash on cash_words('21,474,836.48'::money)

Started by Eugene Pervagoabout 24 years ago2 messagesbugs
Jump to latest
#1Eugene Pervago
pervago@prodigy.net.mx

============================================================================
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:
---------------------------------------------------------------------

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Eugene Pervago (#1)
Re: crash on cash_words('21,474,836.48'::money)

Eugene Pervago <pervago@prodigy.net.mx> writes:

1. select cash_words('21,474,836.48'::money);
2. Crashes.

Fixed for 7.2.1. Thanks for the report!

regards, tom lane