Re: Calling ROUND w/o a numeric cast blowing up all connections (9.1)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Wells Oliver <wellsoliver(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Calling ROUND w/o a numeric cast blowing up all connections (9.1)
Date: 2013-02-09 01:13:12
Message-ID: 28631.1360372392@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Wells Oliver <wellsoliver(at)gmail(dot)com> writes:
> I don't know why this is happening, but it's infuriating. From the psql
> prompt:

> mydb=# select round(5/2, 1);
> SSL SYSCALL error: EOF detected

Huh. Works for me ...

> Nothing shows up in the log.

Either your logging is broken or you're looking in the wrong log, I
think, because that sure looks like a backend crash. And the postmaster
would certainly bleat about a backend crash.

> Have I broken my cast function? My round function? Have I angered the RDMS
> gods? Can anyone give me any pointers?

Dunno, have you messed around with either casting or round()? Can you
reproduce this in a freshly-created database?

FWIW, a stock database ought to have these versions of round():

postgres=# \df round
List of functions
Schema | Name | Result data type | Argument data types | Type
------------+-------+------------------+---------------------+--------
pg_catalog | round | double precision | double precision | normal
pg_catalog | round | numeric | numeric | normal
pg_catalog | round | numeric | numeric, integer | normal
(3 rows)

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Wells Oliver 2013-02-09 01:26:49 Re: Calling ROUND w/o a numeric cast blowing up all connections (9.1)
Previous Message Wells Oliver 2013-02-09 00:38:27 Calling ROUND w/o a numeric cast blowing up all connections (9.1)