PostgreSQL money values are not displayed when a query contains variables

オープン
#983 コメント 5 件 リアクション 1 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
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分
マージ済み PR(30日)
43

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

sqlpage/SQLPage のほかの issue

sqlpage/SQLPage の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。