Thomas Kellerer <spam_eater@gmx.net> writes:
> I'm just curious which setting defines whether monday or sunday is considered the "first day in a week"
A look at the source code (timestamptz_trunc) shows that truncation to
week start follows the ISO week conventions --- so weeks start on
Monday, regardless of locale.
Offhand I do not think that we pay attention to locale for any datetime
calculations. However, there are other places that use Sunday for week
start, so it does matter which calculation you ask for ...
regards, tom lane