git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 06c7234) | patch
Add a timezone-specific variant of date_trunc().
2018年11月14日 20:41:07 +0000 (15:41 -0500)
2018年11月14日 20:41:07 +0000 (15:41 -0500)
commit 600b04d6b5ef6c9ad3ea684aad40260bd60d5872
Add a timezone-specific variant of date_trunc().

date_trunc(field, timestamptz, zone_name) performs truncation using
the named time zone as reference, rather than working in the session
time zone as is the default behavior. It's equivalent to

date_trunc(field, timestamptz at time zone zone_name) at time zone zone_name

but it's faster, easier to type, and arguably easier to understand.

Vik Fearing and Tom Lane

Discussion: https://postgr.es/m/6249ffc4-2b22-4c1b-4e7d-7af84fedd7c6@2ndquadrant.com
doc/src/sgml/func.sgml diff | blob | blame | history
src/backend/utils/adt/timestamp.c diff | blob | blame | history
src/include/catalog/catversion.h diff | blob | blame | history
src/include/catalog/pg_proc.dat diff | blob | blame | history
src/test/regress/expected/timestamptz.out diff | blob | blame | history
src/test/regress/sql/timestamptz.sql diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /