Re: Document DateStyle effect on jsonpath string()

From: "David E(dot) Wheeler" <david(at)justatheory(dot)com>
To: jian he <jian(dot)universality(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Document DateStyle effect on jsonpath string()
Date: 2024-07-04 14:45:27
Message-ID: 4D874C72-8939-4083-8336-AB114D9E29AD@justatheory.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Jul 4, 2024, at 04:28, jian he <jian(dot)universality(at)gmail(dot)com> 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Japin Li 2024-07-04 15:18:23 Re: Support "Right Semi Join" plan shapes
Previous Message Fujii Masao 2024-07-04 14:35:00 Re: Add a GUC check hook to ensure summarize_wal cannot be enabled when wal_level is minimal