Issue with Posting Date range (Tsrange) with Json #1852
-
Environment
Description of issueI don't really think it's a bug but more me that doesn't find how it works ( I am new to this) (Expected behavior vs actual behavior) I want to Post a Json object with a daterange (tsrange in postgresql) (Steps to reproduce: Include a minimal SQL definition plus how you make the request to PostgREST and the response body) basic table in PostgreSql
Js part to make the post request
my issue is pretty simple : I end up with : Object { details: "Missing left parenthesis or bracket.", code: "22P02", message: "malformed range literal: "'{"["2014-01-01 00:00:00+01","2015-01-01 00:00:00+01"]"}'"", … } malformed range literal whenever I try something. So either I shouldn't pass a text argument in the Json for doing this but I can't find any doc or syntax for this case. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
All those have the curly brackets in common - which is exactly what I think is wrong. As you can see from the error message, the curly brackets make it all the way to postgresql - but the docs on range types don't mention any of those: https://www.postgresql.org/docs/current/rangetypes.html. I suggest you start with |
Beta Was this translation helpful? Give feedback.
All those have the curly brackets in common - which is exactly what I think is wrong. As you can see from the error message, the c…