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

Re: ERROR: value out of range: underflow

From: Anton Maksimenkov <anton200(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: ERROR: value out of range: underflow
Date: 2010-02-27 09:30:10
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general
2010/2/26 Anton Maksimenkov <anton200(at)gmail(dot)com>:
> 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(at)gmail(dot)com>:
> 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.

In response to

pgsql-general by date

Next:From: Daniel VeriteDate: 2010-02-27 09:34:42
Subject: Re: Can not match 0 on bytea
Previous:From: seilikiDate: 2010-02-27 09:17:38
Subject: regexp_replace: LF, CR, or tab

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