Re: Re: Patch: Improve Boolean Predicate JSON Path Docs

Erik Wienhold <ewie@ewie.name>

From: Erik Wienhold <ewie@ewie.name>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: "David E. Wheeler" <david@justatheory.com>, pgsql-hackers@lists.postgresql.org
Date: 2024-01-20T02:46:52Z
Lists: pgsql-hackers
On 2024-01-19 22:15 +0100, Tom Lane wrote:
> "David E. Wheeler" <david@justatheory.com> writes:
> > [ v7-0001-Improve-boolean-predicate-JSON-Path-docs.patch ]
> 
> + \set json '{
>    "track": {
>      "segments": [
>        {
> 
> I find the textual change rather unwieldy, but the bigger problem is
> that this example doesn't actually work.  If you try to copy-and-paste
> this into psql, you get "unterminated quoted string", because psql
> metacommands can't span line boundaries.

Interesting... copy-pasting the entire \set command works for me with
psql 16.1 in gnome-terminal and tmux.  Typing it out manually gives me
the "unterminated quoted string" error.  Maybe has to do with my stty
settings.

> I experimented with
> 
> SELECT '
>   ... multiline json value ...
> ' AS json
> \gexec
> 
> but that didn't seem to work either.  Anybody have a better idea?

Fine with me (the \gset variant).

-- 
Erik



Commits

  1. Doc: improve documentation for jsonpath behavior.

  2. Ensure we have a snapshot while dropping ON COMMIT DROP temp tables.