Skip to content

Commit a0ab4f4

Browse files
committed
Add comments linking pg_strftime to timestamptz_to_str
1 parent 242dfcb commit a0ab4f4

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/backend/utils/adt/timestamp.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1738,6 +1738,8 @@ timestamptz_to_time_t(TimestampTz t)
17381738
* This is mostly for use in emitting messages. The primary difference
17391739
* from timestamptz_out is that we force the output format to ISO. Note
17401740
* also that the result is in a static buffer, not pstrdup'd.
1741+
*
1742+
* See also pg_strftime.
17411743
*/
17421744
const char *
17431745
timestamptz_to_str(TimestampTz t)

src/timezone/strftime.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,12 @@ static char *_fmt(const char *, const struct pg_tm *, char *, const char *,
118118
static char *_yconv(int, int, bool, bool, char *, char const *);
119119

120120

121+
/*
122+
* Convert timestamp t to string s, a caller-allocated buffer of size maxsize,
123+
* using the given format pattern.
124+
*
125+
* See also timestamptz_to_str.
126+
*/
121127
size_t
122128
pg_strftime(char *s, size_t maxsize, const char *format, const struct pg_tm *t)
123129
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy