stibbs
09/22/2021, 7:41 AMts
await supabase
.from('posts')
.update({ valid_until: `now() + interval '30 day'` })
.eq('id', postId);
valid_until
is of type timestamp with time zone
Edit: It would appear not... What's the best way to achieve this?
json
{
"hint": null,
"message": "invalid input syntax for type timestamp with time zone: \"now() + interval '30 day'\"",
"code": "22007",
"details": null
}
silentworks
09/22/2021, 4:30 PMnew Date
function or make the valid_until happen in a stored procedure or a function.stibbs
09/23/2021, 12:25 AM