PostgreSQL money values are not displayed when a query contains variables

Aperta
#983 5 commenti 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
47/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
postgresql, rust, sql
Ambito
backend, databases

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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
Lingua principale
Rust
Stelle
2.6k
Fork
175
Merge medio
14h 16m
PR unite (30g)
43

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di sqlpage/SQLPage

Tutte le issue di sqlpage/SQLPage

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.