最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

postgresql - Postgres WHERE clause including a test for a missing JSON tag: WHERE NOT jsonb_path_exists(...) - Stack Overflow

programmeradmin0浏览0评论

I have a complex where clause that tests if a start and end data fall within a range. I also want to include any row where the object containing the start and end date is missing entirely

SELECT id FROM foo WHERE jsonb_path_exists(criteria::jsonb, '$.date_ranges.dates');

How do I write the inverse? Where the "dates" (or "date_ranges") is absent from the JSON

Cheers

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论