Redshift numeric issue after upgrading to cluster version 1.0.27554
See original GitHub issueAfter upgrading Redshift from cluster version 1.0.27085 to 1.0.27554, the numeric values returned from queries through npgsql are way off.
Steps to reproduce
Execute a query that returns a numeric and extract it using either GetDecimal og GetDouble:
await using(var conn = new NpgsqlConnection(connString))
{
await conn.OpenAsync();
await using (var cmd = new NpgsqlCommand("select cast(12.34 as numeric(8,2)) as n", conn))
{
await using (var reader = await cmd.ExecuteReaderAsync())
{
while (await reader.ReadAsync())
{
Console.WriteLine(reader.GetDecimal(0));
}
}
}
}
The issue
The above code writes 123400000000,0000 and not as expected the value 12.34
When executing the code against a cluster with version 1.0.27085, the correct value 12.34 is returned.
Using ODBC driver still returns the correct numeric values on cluster version 1.0.27554.
For now, I have downgraded our cluster to 1.0.27085 and deferred the maintenance window until the 23rd of July, but after that I’m going to have big issues.
Further technical details
Npgsql version: 5.0.7 Redshift version: 1.0.27554 Operating system: N/A
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Cluster versions for Amazon Redshift
Amazon Redshift regularly releases cluster versions. Your Amazon Redshift clusters are patched during your system maintenance window.
Read more >Amazon Redshift clusters - AWS Documentation
Learn the basics of creating a data warehouse by launching a set of compute nodes, called an Amazon Redshift cluster.
Read more >How do I troubleshoot Amazon Redshift connection errors?
Invalid operation connection error · 1. Open the Amazon Redshift console. · 2. Choose the Config tab. · 3. Modify the parameter group...
Read more >Amazon Redshift Numeric: 3 Data Types Simplified
This article provides you with an in-depth guide about Amazon Redshift Numeric data types. Upon a complete walkthrough of the article, ...
Read more >Redshift Cluster Default Port
Running your Redshift database clusters on the default port represent a potential security concern. Replacing the default port number (5439) ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I just tried to create a new cluster, and it seems like this issue has been solved by AWS as with the new cluster version 1.0.27747 it works like expected.
Could you post binary data returned by Red Shift? And have you contacted their support and tried another drivers? You even can try to execute a query in DataGrip or any other JetBrains product since all of them utilize JDBC.