Re: pgsql: Centralize json and jsonb handling of datetime types

2018-01-16 Thread Erik Rijkers
On 2018-01-17 01:29, Andrew Dunstan wrote: Centralize json and jsonb handling of datetime types [...] https://git.postgresql.org/pg/commitdiff/cc4feded0a31d2b732d4ea68613115cb720e624e Modified Files -- src/backend/utils/adt/date.c | 6 +-- src/backend/utils/adt/json.c | 122 +++

Re: pgsql: Centralize json and jsonb handling of datetime types

2018-01-16 Thread Amit Langote
On Wed, Jan 17, 2018 at 9:29 AM, Andrew Dunstan wrote: > Centralize json and jsonb handling of datetime types [ ... ] > src/include/utils/date.h | 4 +- I noticed that these changes cause the following warning to be emitted when compiling with gcc (GCC) 6.2.0: In file included from gram.

pgsql: Centralize json and jsonb handling of datetime types

2018-01-16 Thread Andrew Dunstan
Centralize json and jsonb handling of datetime types The creates a single function JsonEncodeDateTime which will format these data types in an efficient and consistent manner. This will be all the more important when we come to jsonpath so we don't have to implement yet more code doing the same th

pgsql: Remove useless use of bit-masking macros

2018-01-16 Thread Peter Eisentraut
Remove useless use of bit-masking macros In this case, the macros SET_8_BYTES(), GET_8_BYTES(), SET_4_BYTES(), GET_4_BYTES() are no-ops, so we can just remove them. The plan is to perhaps remove them from the source code altogether, so we'll start here. Discussion: https://www.postgresql.org/me