public inbox for [email protected]  
help / color / mirror / Atom feed
From: David E. Wheeler <[email protected]>
To: jian he <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: Re: Document DateStyle effect on jsonpath string()
Date: Thu, 4 Jul 2024 10:45:27 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <CACJufxHREyTFzKOWz3f-yD14HxAdfeP1vGQQ2SQrusZ+ziRJyA@mail.gmail.com>
References: <[email protected]>
	<CACJufxHREyTFzKOWz3f-yD14HxAdfeP1vGQQ2SQrusZ+ziRJyA@mail.gmail.com>

On Jul 4, 2024, at 04:28, jian he <[email protected]> wrote:

> Do you need to reset the datestyle?

Wouldn’t hurt but it’s not necessary, no. It’s set only for the execution of this file, and there are no more calls that rely on it.

> also the above query is time zone sensitive, maybe the time zone is
> set in another place, but that's not explicit?

It’s implicit in how PostgreSQL runs its test suite; other tests later change it.

>        <para>
> -        String value converted from a JSON boolean, number, string, or datetime
> +        String value converted from a JSON boolean, number, string, or
> +        datetime. Note that the string output of datetimes is determined by
> +        the <xref linkend="guc-datestyle"/> parameter.
>        </para>
> imho, your patch has just too many examples.

I’m confused. There are no examples in my patch, or this bit you cite. 

> for explaining the above sentence, the following example should be enough.

Are you referring to the tests? I made them comprehensive so that we reliably demonstrate the behavior of the string() method on all the date/time data types. They are not examples, not in the documentation sense at least.

Best,

David







view thread (14+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Document DateStyle effect on jsonpath string()
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox