Skip to content

Instantly share code, notes, and snippets.

@tejasmanohar
Created December 2, 2016 18:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tejasmanohar/936401a48c146e0026c5ccdb16b1ecd7 to your computer and use it in GitHub Desktop.
Save tejasmanohar/936401a48c146e0026c5ccdb16b1ecd7 to your computer and use it in GitHub Desktop.
postgres vs redshift float8
> CREATE TABLE tejas.test (num float8)
CREATE TABLE
Time: 0.020s
> INSERT INTO tejas.test (num) VALUES (2.33125e-315)
INSERT 0 1
Time: 0.004s
> SELECT num FROM tejas.test
+--------------+
| num |
|--------------|
| 2.33125e-315 |
+--------------+
SELECT 1
Time: 0.002s
> CREATE TABLE tejas_test.test(num float8)
CREATE TABLE
Time: 52.017s (52 seconds)
> INSERT INTO tejas_test.test (num) VALUES (2.33125e-315)
"0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000233125" is out of range for type double preci
sion
Time: 1.026s (a second)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment