Insert too-small double produces wrong exception via Postgres

Bug #889298 reported by Tim Blackman
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Akiban SQL Parser

Bug Description

Using the Postres server to insert a too-small value produces a parse
exception. There is no underflow exception defined, so it is not clear
what exception this should produce.

It is also unclear why this underflow should produce an exception rather
than resulting in truncation.


  CREATE TABLE t (double_field double)


  org.postgresql.util.PSQLException: ERROR: [] Floating point exponent underflow: INSERT INTO t VALUES (4.9E-325)
 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(
 at org.postgresql.core.v3.QueryExecutorImpl.processResults(
 at org.postgresql.core.v3.QueryExecutorImpl.execute(
 at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(
 at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(
 at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(

To reproduce:

  mvn test -Dtest=PostgresServerMiscYamlIT

Reproduced in trunk revision 1239

Tags: types
Revision history for this message
Mike McMahon (mmcm) wrote :
affects: akiban-server → akiban-sql-parser
Changed in akiban-sql-parser:
status: New → Confirmed
Revision history for this message
Timothy Wegner (timmwegner) wrote :

This error is specific to literal floats. We should probably have a separate handling of computed floats.

Changed in akiban-sql-parser:
milestone: none → samba
importance: Undecided → Low
tags: added: types
Changed in akiban-sql-parser:
milestone: samba → future
information type: Private → Public
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.