3 ms·
Yesterday I just used it for the first time instead of checking the Postgres docs for some obscure JSON operators. I just asked it this: "I have a postgres dat
by _xnmw 4y ago
Yesterday I just used it for the first time instead of checking the Postgres docs for some obscure JSON operators. I just asked it this:
"I have a postgres database with a json column with the following structure: [1, 2, 4, 4]. How do I query the database in SQL to retrieve all rows where the array in the json column contains the number 4?"
And it gave me a wrong answer at first (worked for strings only, not integers), but quickly corrected itself after I pointed out the mistake. I had working, testable code faster than if I had checked SO or browsed the Postgres docs.