Insert too-large double produces wrong exception via Postgres

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

Bug Description

Using the Postgres server to insert a too-large value produces a parse
exception rather than an overflow exception (error code 42000
vs. 55004).

Note that it is also unclear why this overflow should produce an
exception when integer overflows are truncated.


  CREATE TABLE t (double_field double)
  INSERT INTO t VALUES (1.7976931348623157E309)


  org.postgresql.util.PSQLException: ERROR: [] Floating point exponent overflow: INSERT INTO t VALUES (1.7976931348623157E309)
 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(
 ... 44 more

To reproduce:

  mvn test -Dtest=PostgresServerMiscYamlIT

Reproduced in trunk revision 1239

Tags: types
Revision history for this message
Mike McMahon (mmcm) wrote :

Since it is not possible to store a Double literal of this value, this probably requires a more specific Exception from the parser itself.

affects: akiban-server → akiban-sql-parser
Changed in akiban-sql-parser:
status: New → Confirmed
Changed in akiban-sql-parser:
milestone: none → future
importance: Undecided → Low
tags: added: types
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.