Skip to content

PostgreSQL money values are not displayed when a query contains variables #983

@rhysparry

Description

@rhysparry

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions