Thread

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. doc: Small example improvement

  1. Doubt in reset date style

    Manav Kumar <mkumar@yugabyte.com> — 2025-04-30T21:17:27Z

    Hi Team,
    I have a doubt in the expected output file:
    src/test/regress/expected/horology.out
    
    at
    https://github.com/postgres/postgres/blob/913c60b067aa1a618420fd0372c4df3cf5501863/src/test/regress/expected/horology.out#L117.
    
    
    After doing the reset DateStyle.
    Why output is still in 'Postgres, MDY' form rather than 'ISO, MDY'. As
    reset would have reset the datestyle value to default value as 'ISO, MDY'.
    I don't see any Alter cmd which changes the default value of DateStyle as
    well.
    Can you please correct me why this Pg Behaviour is expected.
    
    Thanks In Advance!
    
  2. Re: Doubt in reset date style

    David G. Johnston <david.g.johnston@gmail.com> — 2025-04-30T21:31:11Z

    On Wed, Apr 30, 2025 at 2:17 PM Manav Kumar <mkumar@yugabyte.com> wrote:
    
    >
    > at
    > https://github.com/postgres/postgres/blob/913c60b067aa1a618420fd0372c4df3cf5501863/src/test/regress/expected/horology.out#L117.
    >
    >
    >
    
    > I don't see any Alter cmd which changes the default value of DateStyle as
    > well.
    >
    
    There are many ways to change GUCs (I'm unsure where exactly this one comes
    into play, feel free to look or wait for others to comment).  Assume that
    the script, when the first thing it does is 'SHOW DateStyle;' when issuing
    "reset datestyle", will have its value reset to the shown value.  The
    calling environment has made it so that is the session default.
    
    The session default is:
    
    SHOW DateStyle;
       DateStyle
    ---------------
     Postgres, MDY
    (1 row)
    
    David J.
    
  3. Re: Doubt in reset date style

    Tom Lane <tgl@sss.pgh.pa.us> — 2025-04-30T21:56:04Z

    Manav Kumar <mkumar@yugabyte.com> writes:
    > I have a doubt in the expected output file:
    > src/test/regress/expected/horology.out
    
    > After doing the reset DateStyle.
    > Why output is still in 'Postgres, MDY' form rather than 'ISO, MDY'.
    
    Because pg_regress.c does this:
    
    	setenv("PGDATESTYLE", "Postgres, MDY", 1);
    
    which determines the environment for all the psql runs it
    launches.
    
    			regards, tom lane