diff options
author | Michael Paquier <michael@paquier.xyz> | 2022-12-30 20:47:57 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2022-12-30 20:47:57 +0900 |
commit | 7aa81c61ec8f68212570192f3088544dbfa43cb9 (patch) | |
tree | 5af49de71f755bb7dd199881b6233bd3454e4e6f /contrib/postgres_fdw/postgres_fdw.c | |
parent | 1f605b82ba66ece8b421b10d41094dd2e3c0c48b (diff) | |
download | postgresql-7aa81c61ec8f68212570192f3088544dbfa43cb9.tar.gz postgresql-7aa81c61ec8f68212570192f3088544dbfa43cb9.zip |
Fix precision handling for some COERCE_SQL_SYNTAX functions
f193883 has been incorrectly setting up the precision used in the
timestamp compilations returned by the following functions:
- LOCALTIME
- LOCALTIMESTAMP
- CURRENT_TIME
- CURRENT_TIMESTAMP
Specifying an out-of-range precision for CURRENT_TIMESTAMP and
LOCALTIMESTAMP was raising a WARNING without adjusting the precision,
leading to a subsequent error. LOCALTIME and CURRENT_TIME raised a
WARNING without an error, still the precision given to the internal
routines was not correct, so let's be clean.
Ian has reported the problems in timestamp.c, while I have noticed the
ones in date.c. Regression tests are added for all of them with
precisions high enough to provide coverage for the warnings, something
that went missing up to this commit.
Author: Ian Lawrence Barwick, Michael Paquier
Discussion: https://postgr.es/m/CAB8KJ=jQEnn9sYG+N752spt68wMrhmT-ocHCh4oeNmHF82QMWA@mail.gmail.com
Diffstat (limited to 'contrib/postgres_fdw/postgres_fdw.c')
0 files changed, 0 insertions, 0 deletions