Re: Re: Patch: Improve Boolean Predicate JSON Path Docs - Mailing list pgsql-hackers

From Erik Wienhold
Subject Re: Re: Patch: Improve Boolean Predicate JSON Path Docs
Date
Msg-id 6zxereqhl55sbpnevnh3szojc7w3dhowlb3fknzmi6mmwsi2q3@t3ubsz2gac5a
Whole thread Raw
In response to Re: Patch: Improve Boolean Predicate JSON Path Docs  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Patch: Improve Boolean Predicate JSON Path Docs
List 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



pgsql-hackers by date:

Previous
From: vignesh C
Date:
Subject: Re: Amcheck verification of GiST and GIN
Next
From: jian he
Date:
Subject: Re: add function argument names to regex* functions.