JSON doc example (matchiness)

Erik Rijkers <er@xs4all.nl>

From: Erik Rijkers <er@xs4all.nl>
To: pgsql-hackers@lists.postgresql.org
Date: 2021-05-07T20:18:44Z
Lists: pgsql-hackers

Attachments

The JSON doc has this example (to show the need for double backslash):

$ ? (@ like_regex "^\\d+$")


The example is not wrong exactly, and can be cast to jsonpath, but as-is 
can never match anything.

I think it'd be helpful to provide that example so that it more probably 
matches when the user does a quick trial.

Llet's change it to something like:

$.* ? (@ like_regex "^\\d+$")


Patch attached.

thanks,

Erik Rijkers

Commits

  1. Improve documentation example for jsonpath like_regex operator