diff options
author | Tom Lane | 2024-08-16 16:35:50 +0000 |
---|---|---|
committer | Tom Lane | 2024-08-16 16:35:53 +0000 |
commit | 6be39d77a70df52d5a0f2eb414ef9901ccf17e5a (patch) | |
tree | 53bdc6708c641c016e674635bf87ef601873b77e /src/interfaces | |
parent | 108d2adb9e9e084cd57bf514d06ef4b954719ffa (diff) |
Fix extraction of week and quarter fields from intervals.
"EXTRACT(WEEK FROM interval_value)" formerly threw an error.
Define it as "tm->tm_mday / 7". (With C99 division semantics,
this gives consistent results for negative intervals.)
"EXTRACT(QUARTER FROM interval_value)" has been implemented
all along, but it formerly gave extremely strange results for
negative intervals. Fix it so that the output for -N months
is the negative of the output for N months.
Per bug #18348 from Michael Bondarenko and subsequent discussion.
Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src/interfaces')
0 files changed, 0 insertions, 0 deletions