-
-
Notifications
You must be signed in to change notification settings - Fork 44
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Bug report
- I confirm this is a bug with Supabase, not with my own application.
- I confirm I have searched the Docs, GitHub Discussions, and Discord.
Describe the bug
Number schemas with a multipleOf less than 1 don't validate. For example, 17.2 should be valid against the schema {"type": "number","multipleOf": 0.1}, but json_matches_schema returns false.
I have verified the expected behavior using jsonschemavalidator.net.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
Run the following in a Postgres database with the extension installed:
SELECT json_matches_schema(
'{"type": "number","multipleOf": 0.1}',
'17.2'
);The above statement returns false.
Expected behavior
The above statement should return true.
Screenshots
N/A
System information
- PostgreSQL: v16 (Neon)
Additional context
N/A
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working