pg.ddx.io pgsql-bugs@postgresql.org mailing list archivehelp / color / mirror / Atom feed
Doubt in reset date style 3+ messages / 3 participants [nested] [flat]
* Doubt in reset date style @ 2025-04-30 21:17 Manav Kumar <mkumar@yugabyte.com> 2025-04-30 21:31 ` Re: Doubt in reset date style David G. Johnston <david.g.johnston@gmail.com> 2025-04-30 21:56 ` Re: Doubt in reset date style Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 2 replies; 3+ messages in thread From: Manav Kumar @ 2025-04-30 21:17 UTC (permalink / raw) To: pgsql-bugs@lists.postgresql.org 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/.... 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! ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Doubt in reset date style 2025-04-30 21:17 Doubt in reset date style Manav Kumar <mkumar@yugabyte.com> @ 2025-04-30 21:31 ` David G. Johnston <david.g.johnston@gmail.com> 1 sibling, 0 replies; 3+ messages in thread From: David G. Johnston @ 2025-04-30 21:31 UTC (permalink / raw) To: Manav Kumar <mkumar@yugabyte.com>; +Cc: pgsql-bugs@lists.postgresql.org 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/.... > > > > 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. ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Doubt in reset date style 2025-04-30 21:17 Doubt in reset date style Manav Kumar <mkumar@yugabyte.com> @ 2025-04-30 21:56 ` Tom Lane <tgl@sss.pgh.pa.us> 1 sibling, 0 replies; 3+ messages in thread From: Tom Lane @ 2025-04-30 21:56 UTC (permalink / raw) To: Manav Kumar <mkumar@yugabyte.com>; +Cc: pgsql-bugs@lists.postgresql.org 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 ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2025-04-30 21:56 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2025-04-30 21:17 Doubt in reset date style Manav Kumar <mkumar@yugabyte.com> 2025-04-30 21:31 ` David G. Johnston <david.g.johnston@gmail.com> 2025-04-30 21:56 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox