-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #256 from duckdb/ubigint
Fix #246 - convert ubigint to `decimal(20,0)` instead of to double to avoid loss of precision
- Loading branch information
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# name: test/sql/storage/attach_ubigint.test | ||
# description: Test inserting/querying UBIGINT | ||
# group: [storage] | ||
|
||
require postgres_scanner | ||
|
||
require-env POSTGRES_TEST_DATABASE_AVAILABLE | ||
|
||
statement ok | ||
PRAGMA enable_verification | ||
|
||
statement ok | ||
ATTACH 'dbname=postgresscanner' AS s (TYPE POSTGRES) | ||
|
||
statement ok | ||
USE s; | ||
|
||
statement ok | ||
CREATE OR REPLACE TABLE ubigints(u UBIGINT); | ||
|
||
statement ok | ||
INSERT INTO ubigints VALUES (1394265502879208448); | ||
|
||
query I | ||
SELECT u::VARCHAR FROM ubigints | ||
---- | ||
1394265502879208448 |