Add comments linking pg_strftime to timestamptz_to_str
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Fri, 15 May 2020 22:05:34 +0000 (18:05 -0400)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Fri, 15 May 2020 22:05:34 +0000 (18:05 -0400)
src/backend/utils/adt/timestamp.c
src/timezone/strftime.c

index 4caffb580409ec245e76c201fcf9820daa9a9df2..876605573c1e9c7dbdd1e93aa7fcb2df8561c9ed 100644 (file)
@@ -1738,6 +1738,8 @@ timestamptz_to_time_t(TimestampTz t)
  * This is mostly for use in emitting messages.  The primary difference
  * from timestamptz_out is that we force the output format to ISO.  Note
  * also that the result is in a static buffer, not pstrdup'd.
+ *
+ * See also pg_strftime.
  */
 const char *
 timestamptz_to_str(TimestampTz t)
index 55c617f8c22c5365ecfa5a3f36f342cd83112993..380b4888a5e550fe1f6aced7c19fb2fcb60d61b4 100644 (file)
@@ -118,6 +118,12 @@ static char *_fmt(const char *, const struct pg_tm *, char *, const char *,
 static char *_yconv(int, int, bool, bool, char *, char const *);
 
 
+/*
+ * Convert timestamp t to string s, a caller-allocated buffer of size maxsize,
+ * using the given format pattern.
+ *
+ * See also timestamptz_to_str.
+ */
 size_t
 pg_strftime(char *s, size_t maxsize, const char *format, const struct pg_tm *t)
 {