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

+2
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

+6
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)