PostgreSQL money values are not displayed when a query contains variables

未关闭
#983 5 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
47/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
postgresql, rust, sql
领域
backend, databases

调研方向

Start by locating sql_to_json from the log message and inspect how PostgreSQL money values are decoded, especially for the supplied query in the issue. Reproduce against PostgreSQL with SQLPage 0.36.0 and compare the displayed value with 0.35.1; done means the currency amount and symbol display correctly without the decode error.

由索引模型根据 Issue 内容生成。

描述

blocked :: upstream bug
Introduction

After upgrading to SQLPage 0.36.0, money values from PostgreSQL now all show 0.0 as the value. This worked in version 0.35.0.

To Reproduce

With a PostgreSQL database configured, use the following SQL query:

select 'big_number' as component;

select 1.23::money as value,
       'Value' as title,
       'Money value' as description
;
Actual behavior

Value shows as 0.0

The following error is shown in the logs:

sqlpage::webserver::database::sql_to_json] Failed to decode f64 value: invalid float literal
Screenshots

Actual (0.36.0):

Actual: 0.0

Expected (from 0.35.1):

Expected: $1.23
Expected behavior

The value will be displayed correctly with the currency symbol (as per version 0.35.1)

Version information
  • OS: macOS
  • Database PostgreSQL
  • SQLPage Version: 0.36.0
主要语言
Rust
星标
2.6k
派生
175
平均合并
14 小时 16 分钟
30 天内合并 PR
43

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

sqlpage/SQLPage 的其他 Issue

查看 sqlpage/SQLPage 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。