Search Postgresql Archives

Re: ERROR: value out of range: underflow

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2010/2/26 Anton Maksimenkov <anton200@xxxxxxxxx>:
> When I try it in pgAdmin, first time it show me error:
> --
> ERROR:  value out of range: underflow
> CONTEXT:  PL/pgSQL function "myf_convert_phone18digits" line 12 at assignment
> --
> SECOND (and consequences) time it works and just show result 771506000000000000

Oh, sorry to all. It was:

SELECT myf_convert_phone18digits('7715060');

I still interesting why it fail first time but executed at second.

2010/2/26 Thom Brown <thombrown@xxxxxxxxx>:
> Are you sure you wish to perform calculations on a phone number?  Why
> not pad it out?  Like: select rpad('2329382',18,'0') which would
> return "232938200000000000"

Damn, right! I'll use it.
-- 
antonvm

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux