public inbox for [email protected]  
help / color / mirror / Atom feed
[PATCH v1] Replace the char to bool array for null parameters
5+ messages / 3 participants
[nested] [flat]

* [PATCH v1] Replace the char to bool array for null parameters
@ 2021-01-19 07:51 Japin Li <[email protected]>
  0 siblings, 0 replies; 5+ messages in thread

From: Japin Li @ 2021-01-19 07:51 UTC (permalink / raw)

---
 doc/src/sgml/spi.sgml               | 60 ++++++++++++-----------------
 src/backend/executor/spi.c          | 18 ++++-----
 src/backend/utils/adt/ri_triggers.c |  8 ++--
 src/backend/utils/adt/ruleutils.c   | 10 ++---
 src/include/executor/spi.h          | 12 +++---
 src/pl/plperl/plperl.c              |  6 +--
 src/pl/plpython/plpy_cursorobject.c |  6 +--
 src/test/regress/regress.c          | 12 +++---
 8 files changed, 61 insertions(+), 71 deletions(-)

diff --git a/doc/src/sgml/spi.sgml b/doc/src/sgml/spi.sgml
index f5e0a35da0..d3cc405c42 100644
--- a/doc/src/sgml/spi.sgml
+++ b/doc/src/sgml/spi.sgml
@@ -649,7 +649,7 @@ int SPI_exec(const char * <parameter>command</parameter>, long <parameter>count<
 <synopsis>
 int SPI_execute_with_args(const char *<parameter>command</parameter>,
                           int <parameter>nargs</parameter>, Oid *<parameter>argtypes</parameter>,
-                          Datum *<parameter>values</parameter>, const char *<parameter>nulls</parameter>,
+                          Datum *<parameter>values</parameter>, const bool *<parameter>nulls</parameter>,
                           bool <parameter>read_only</parameter>, long <parameter>count</parameter>)
 </synopsis>
  </refsynopsisdiv>
@@ -728,7 +728,7 @@ int SPI_execute_with_args(const char *<parameter>command</parameter>,
    </varlistentry>
 
    <varlistentry>
-    <term><literal>const char * <parameter>nulls</parameter></literal></term>
+    <term><literal>const bool * <parameter>nulls</parameter></literal></term>
     <listitem>
      <para>
       an array of length <parameter>nargs</parameter>, describing which
@@ -739,12 +739,10 @@ int SPI_execute_with_args(const char *<parameter>command</parameter>,
       If <parameter>nulls</parameter> is <symbol>NULL</symbol> then
       <function>SPI_execute_with_args</function> assumes that no parameters
       are null.  Otherwise, each entry of the <parameter>nulls</parameter>
-      array should be <literal>'&nbsp;'</literal> if the corresponding parameter
-      value is non-null, or <literal>'n'</literal> if the corresponding parameter
+      array should be <literal>false</literal> if the corresponding parameter
+      value is non-null, or <literal>true</literal> if the corresponding parameter
       value is null.  (In the latter case, the actual value in the
-      corresponding <parameter>values</parameter> entry doesn't matter.)  Note
-      that <parameter>nulls</parameter> is not a text string, just an array:
-      it does not need a <literal>'\0'</literal> terminator.
+      corresponding <parameter>values</parameter> entry doesn't matter.)
      </para>
     </listitem>
    </varlistentry>
@@ -1601,7 +1599,7 @@ bool SPI_is_cursor_plan(SPIPlanPtr <parameter>plan</parameter>)
 
  <refsynopsisdiv>
 <synopsis>
-int SPI_execute_plan(SPIPlanPtr <parameter>plan</parameter>, Datum * <parameter>values</parameter>, const char * <parameter>nulls</parameter>,
+int SPI_execute_plan(SPIPlanPtr <parameter>plan</parameter>, Datum * <parameter>values</parameter>, const bool * <parameter>nulls</parameter>,
                      bool <parameter>read_only</parameter>, long <parameter>count</parameter>)
 </synopsis>
  </refsynopsisdiv>
@@ -1642,7 +1640,7 @@ int SPI_execute_plan(SPIPlanPtr <parameter>plan</parameter>, Datum * <parameter>
    </varlistentry>
 
    <varlistentry>
-    <term><literal>const char * <parameter>nulls</parameter></literal></term>
+    <term><literal>const bool * <parameter>nulls</parameter></literal></term>
     <listitem>
      <para>
       An array describing which parameters are null.  Must have same length as
@@ -1653,12 +1651,10 @@ int SPI_execute_plan(SPIPlanPtr <parameter>plan</parameter>, Datum * <parameter>
       If <parameter>nulls</parameter> is <symbol>NULL</symbol> then
       <function>SPI_execute_plan</function> assumes that no parameters
       are null.  Otherwise, each entry of the <parameter>nulls</parameter>
-      array should be <literal>'&nbsp;'</literal> if the corresponding parameter
-      value is non-null, or <literal>'n'</literal> if the corresponding parameter
+      array should be <literal>false</literal> if the corresponding parameter
+      value is non-null, or <literal>true</literal> if the corresponding parameter
       value is null.  (In the latter case, the actual value in the
-      corresponding <parameter>values</parameter> entry doesn't matter.)  Note
-      that <parameter>nulls</parameter> is not a text string, just an array:
-      it does not need a <literal>'\0'</literal> terminator.
+      corresponding <parameter>values</parameter> entry doesn't matter.)
      </para>
     </listitem>
    </varlistentry>
@@ -1946,7 +1942,7 @@ int SPI_execute_plan_with_receiver(SPIPlanPtr <parameter>plan</parameter>,
 
  <refsynopsisdiv>
 <synopsis>
-int SPI_execp(SPIPlanPtr <parameter>plan</parameter>, Datum * <parameter>values</parameter>, const char * <parameter>nulls</parameter>, long <parameter>count</parameter>)
+int SPI_execp(SPIPlanPtr <parameter>plan</parameter>, Datum * <parameter>values</parameter>, const bool * <parameter>nulls</parameter>, long <parameter>count</parameter>)
 </synopsis>
  </refsynopsisdiv>
 
@@ -1985,7 +1981,7 @@ int SPI_execp(SPIPlanPtr <parameter>plan</parameter>, Datum * <parameter>values<
    </varlistentry>
 
    <varlistentry>
-    <term><literal>const char * <parameter>nulls</parameter></literal></term>
+    <term><literal>const bool * <parameter>nulls</parameter></literal></term>
     <listitem>
      <para>
       An array describing which parameters are null.  Must have same length as
@@ -1996,12 +1992,10 @@ int SPI_execp(SPIPlanPtr <parameter>plan</parameter>, Datum * <parameter>values<
       If <parameter>nulls</parameter> is <symbol>NULL</symbol> then
       <function>SPI_execp</function> assumes that no parameters
       are null.  Otherwise, each entry of the <parameter>nulls</parameter>
-      array should be <literal>'&nbsp;'</literal> if the corresponding parameter
-      value is non-null, or <literal>'n'</literal> if the corresponding parameter
+      array should be <literal>false</literal> if the corresponding parameter
+      value is non-null, or <literal>true</literal> if the corresponding parameter
       value is null.  (In the latter case, the actual value in the
-      corresponding <parameter>values</parameter> entry doesn't matter.)  Note
-      that <parameter>nulls</parameter> is not a text string, just an array:
-      it does not need a <literal>'\0'</literal> terminator.
+      corresponding <parameter>values</parameter> entry doesn't matter.)
      </para>
     </listitem>
    </varlistentry>
@@ -2051,7 +2045,7 @@ int SPI_execp(SPIPlanPtr <parameter>plan</parameter>, Datum * <parameter>values<
  <refsynopsisdiv>
 <synopsis>
 Portal SPI_cursor_open(const char * <parameter>name</parameter>, SPIPlanPtr <parameter>plan</parameter>,
-                       Datum * <parameter>values</parameter>, const char * <parameter>nulls</parameter>,
+                       Datum * <parameter>values</parameter>, const bool * <parameter>nulls</parameter>,
                        bool <parameter>read_only</parameter>)
 </synopsis>
  </refsynopsisdiv>
@@ -2117,7 +2111,7 @@ Portal SPI_cursor_open(const char * <parameter>name</parameter>, SPIPlanPtr <par
    </varlistentry>
 
    <varlistentry>
-    <term><literal>const char * <parameter>nulls</parameter></literal></term>
+    <term><literal>const bool * <parameter>nulls</parameter></literal></term>
     <listitem>
      <para>
       An array describing which parameters are null.  Must have same length as
@@ -2128,12 +2122,10 @@ Portal SPI_cursor_open(const char * <parameter>name</parameter>, SPIPlanPtr <par
       If <parameter>nulls</parameter> is <symbol>NULL</symbol> then
       <function>SPI_cursor_open</function> assumes that no parameters
       are null.  Otherwise, each entry of the <parameter>nulls</parameter>
-      array should be <literal>'&nbsp;'</literal> if the corresponding parameter
-      value is non-null, or <literal>'n'</literal> if the corresponding parameter
+      array should be <literal>false</literal> if the corresponding parameter
+      value is non-null, or <literal>true</literal> if the corresponding parameter
       value is null.  (In the latter case, the actual value in the
-      corresponding <parameter>values</parameter> entry doesn't matter.)  Note
-      that <parameter>nulls</parameter> is not a text string, just an array:
-      it does not need a <literal>'\0'</literal> terminator.
+      corresponding <parameter>values</parameter> entry doesn't matter.)
      </para>
     </listitem>
    </varlistentry>
@@ -2177,7 +2169,7 @@ Portal SPI_cursor_open(const char * <parameter>name</parameter>, SPIPlanPtr <par
 Portal SPI_cursor_open_with_args(const char *<parameter>name</parameter>,
                                  const char *<parameter>command</parameter>,
                                  int <parameter>nargs</parameter>, Oid *<parameter>argtypes</parameter>,
-                                 Datum *<parameter>values</parameter>, const char *<parameter>nulls</parameter>,
+                                 Datum *<parameter>values</parameter>, const bool *<parameter>nulls</parameter>,
                                  bool <parameter>read_only</parameter>, int <parameter>cursorOptions</parameter>)
 </synopsis>
  </refsynopsisdiv>
@@ -2261,7 +2253,7 @@ Portal SPI_cursor_open_with_args(const char *<parameter>name</parameter>,
    </varlistentry>
 
    <varlistentry>
-    <term><literal>const char * <parameter>nulls</parameter></literal></term>
+    <term><literal>const bool * <parameter>nulls</parameter></literal></term>
     <listitem>
      <para>
       an array of length <parameter>nargs</parameter>, describing which
@@ -2272,12 +2264,10 @@ Portal SPI_cursor_open_with_args(const char *<parameter>name</parameter>,
       If <parameter>nulls</parameter> is <symbol>NULL</symbol> then
       <function>SPI_cursor_open_with_args</function> assumes that no parameters
       are null.  Otherwise, each entry of the <parameter>nulls</parameter>
-      array should be <literal>'&nbsp;'</literal> if the corresponding parameter
-      value is non-null, or <literal>'n'</literal> if the corresponding parameter
+      array should be <literal>false</literal> if the corresponding parameter
+      value is non-null, or <literal>true</literal> if the corresponding parameter
       value is null.  (In the latter case, the actual value in the
-      corresponding <parameter>values</parameter> entry doesn't matter.)  Note
-      that <parameter>nulls</parameter> is not a text string, just an array:
-      it does not need a <literal>'\0'</literal> terminator.
+      corresponding <parameter>values</parameter> entry doesn't matter.)
      </para>
     </listitem>
    </varlistentry>
diff --git a/src/backend/executor/spi.c b/src/backend/executor/spi.c
index e28d242922..631ab2167a 100644
--- a/src/backend/executor/spi.c
+++ b/src/backend/executor/spi.c
@@ -70,7 +70,7 @@ static int	_SPI_execute_plan(SPIPlanPtr plan, ParamListInfo paramLI,
 							  DestReceiver *caller_dest);
 
 static ParamListInfo _SPI_convert_params(int nargs, Oid *argtypes,
-										 Datum *Values, const char *Nulls);
+										 Datum *Values, const bool *Nulls);
 
 static int	_SPI_pquery(QueryDesc *queryDesc, bool fire_triggers, uint64 tcount);
 
@@ -536,7 +536,7 @@ SPI_exec(const char *src, long tcount)
 
 /* Execute a previously prepared plan */
 int
-SPI_execute_plan(SPIPlanPtr plan, Datum *Values, const char *Nulls,
+SPI_execute_plan(SPIPlanPtr plan, Datum *Values, const bool *Nulls,
 				 bool read_only, long tcount)
 {
 	int			res;
@@ -563,7 +563,7 @@ SPI_execute_plan(SPIPlanPtr plan, Datum *Values, const char *Nulls,
 
 /* Obsolete version of SPI_execute_plan */
 int
-SPI_execp(SPIPlanPtr plan, Datum *Values, const char *Nulls, long tcount)
+SPI_execp(SPIPlanPtr plan, Datum *Values, const bool *Nulls, long tcount)
 {
 	return SPI_execute_plan(plan, Values, Nulls, false, tcount);
 }
@@ -634,7 +634,7 @@ SPI_execute_plan_with_receiver(SPIPlanPtr plan,
  */
 int
 SPI_execute_snapshot(SPIPlanPtr plan,
-					 Datum *Values, const char *Nulls,
+					 Datum *Values, const bool *Nulls,
 					 Snapshot snapshot, Snapshot crosscheck_snapshot,
 					 bool read_only, bool fire_triggers, long tcount)
 {
@@ -669,7 +669,7 @@ SPI_execute_snapshot(SPIPlanPtr plan,
 int
 SPI_execute_with_args(const char *src,
 					  int nargs, Oid *argtypes,
-					  Datum *Values, const char *Nulls,
+					  Datum *Values, const bool *Nulls,
 					  bool read_only, long tcount)
 {
 	int			res;
@@ -1339,7 +1339,7 @@ SPI_freetuptable(SPITupleTable *tuptable)
  */
 Portal
 SPI_cursor_open(const char *name, SPIPlanPtr plan,
-				Datum *Values, const char *Nulls,
+				Datum *Values, const bool *Nulls,
 				bool read_only)
 {
 	Portal		portal;
@@ -1368,7 +1368,7 @@ Portal
 SPI_cursor_open_with_args(const char *name,
 						  const char *src,
 						  int nargs, Oid *argtypes,
-						  Datum *Values, const char *Nulls,
+						  Datum *Values, const bool *Nulls,
 						  bool read_only, int cursorOptions)
 {
 	Portal		result;
@@ -2636,7 +2636,7 @@ fail:
  */
 static ParamListInfo
 _SPI_convert_params(int nargs, Oid *argtypes,
-					Datum *Values, const char *Nulls)
+					Datum *Values, const bool *Nulls)
 {
 	ParamListInfo paramLI;
 
@@ -2649,7 +2649,7 @@ _SPI_convert_params(int nargs, Oid *argtypes,
 			ParamExternData *prm = &paramLI->params[i];
 
 			prm->value = Values[i];
-			prm->isnull = (Nulls && Nulls[i] == 'n');
+			prm->isnull = Nulls && Nulls[i];
 			prm->pflags = PARAM_FLAG_CONST;
 			prm->ptype = argtypes[i];
 		}
diff --git a/src/backend/utils/adt/ri_triggers.c b/src/backend/utils/adt/ri_triggers.c
index 6e3a41062f..793766570d 100644
--- a/src/backend/utils/adt/ri_triggers.c
+++ b/src/backend/utils/adt/ri_triggers.c
@@ -216,7 +216,7 @@ static bool ri_PerformCheck(const RI_ConstraintInfo *riinfo,
 							bool detectNewRows, int expect_OK);
 static void ri_ExtractValues(Relation rel, TupleTableSlot *slot,
 							 const RI_ConstraintInfo *riinfo, bool rel_is_pk,
-							 Datum *vals, char *nulls);
+							 Datum *vals, bool *nulls);
 static void ri_ReportViolation(const RI_ConstraintInfo *riinfo,
 							   Relation pk_rel, Relation fk_rel,
 							   TupleTableSlot *violatorslot, TupleDesc tupdesc,
@@ -2191,7 +2191,7 @@ ri_PerformCheck(const RI_ConstraintInfo *riinfo,
 	Oid			save_userid;
 	int			save_sec_context;
 	Datum		vals[RI_MAX_NUMKEYS * 2];
-	char		nulls[RI_MAX_NUMKEYS * 2];
+	bool		nulls[RI_MAX_NUMKEYS * 2];
 
 	/*
 	 * Use the query type code to determine whether the query is run against
@@ -2314,7 +2314,7 @@ ri_PerformCheck(const RI_ConstraintInfo *riinfo,
 static void
 ri_ExtractValues(Relation rel, TupleTableSlot *slot,
 				 const RI_ConstraintInfo *riinfo, bool rel_is_pk,
-				 Datum *vals, char *nulls)
+				 Datum *vals, bool *nulls)
 {
 	const int16 *attnums;
 	bool		isnull;
@@ -2327,7 +2327,7 @@ ri_ExtractValues(Relation rel, TupleTableSlot *slot,
 	for (int i = 0; i < riinfo->nkeys; i++)
 	{
 		vals[i] = slot_getattr(slot, attnums[i], &isnull);
-		nulls[i] = isnull ? 'n' : ' ';
+		nulls[i] = isnull;
 	}
 }
 
diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c
index 8a1fbda572..3c8fa2c95d 100644
--- a/src/backend/utils/adt/ruleutils.c
+++ b/src/backend/utils/adt/ruleutils.c
@@ -531,7 +531,7 @@ static char *
 pg_get_ruledef_worker(Oid ruleoid, int prettyFlags)
 {
 	Datum		args[1];
-	char		nulls[1];
+	bool		nulls[1];
 	int			spirc;
 	HeapTuple	ruletup;
 	TupleDesc	rulettc;
@@ -570,7 +570,7 @@ pg_get_ruledef_worker(Oid ruleoid, int prettyFlags)
 	 * Get the pg_rewrite tuple for this rule
 	 */
 	args[0] = ObjectIdGetDatum(ruleoid);
-	nulls[0] = ' ';
+	nulls[0] = false;
 	spirc = SPI_execute_plan(plan_getrulebyoid, args, nulls, true, 0);
 	if (spirc != SPI_OK_SELECT)
 		elog(ERROR, "failed to get pg_rewrite tuple for rule %u", ruleoid);
@@ -724,7 +724,7 @@ static char *
 pg_get_viewdef_worker(Oid viewoid, int prettyFlags, int wrapColumn)
 {
 	Datum		args[2];
-	char		nulls[2];
+	bool		nulls[2];
 	int			spirc;
 	HeapTuple	ruletup;
 	TupleDesc	rulettc;
@@ -765,8 +765,8 @@ pg_get_viewdef_worker(Oid viewoid, int prettyFlags, int wrapColumn)
 	 */
 	args[0] = ObjectIdGetDatum(viewoid);
 	args[1] = DirectFunctionCall1(namein, CStringGetDatum(ViewSelectRuleName));
-	nulls[0] = ' ';
-	nulls[1] = ' ';
+	nulls[0] = false;
+	nulls[1] = false;
 	spirc = SPI_execute_plan(plan_getviewrule, args, nulls, true, 0);
 	if (spirc != SPI_OK_SELECT)
 		elog(ERROR, "failed to get pg_rewrite tuple for view %u", viewoid);
diff --git a/src/include/executor/spi.h b/src/include/executor/spi.h
index 9c70603434..8e4bd34ff7 100644
--- a/src/include/executor/spi.h
+++ b/src/include/executor/spi.h
@@ -94,7 +94,7 @@ extern int	SPI_connect(void);
 extern int	SPI_connect_ext(int options);
 extern int	SPI_finish(void);
 extern int	SPI_execute(const char *src, bool read_only, long tcount);
-extern int	SPI_execute_plan(SPIPlanPtr plan, Datum *Values, const char *Nulls,
+extern int	SPI_execute_plan(SPIPlanPtr plan, Datum *Values, const bool *Nulls,
 							 bool read_only, long tcount);
 extern int	SPI_execute_plan_with_paramlist(SPIPlanPtr plan,
 											ParamListInfo params,
@@ -104,16 +104,16 @@ extern int	SPI_execute_plan_with_receiver(SPIPlanPtr plan,
 										   bool read_only, long tcount,
 										   DestReceiver *dest);
 extern int	SPI_exec(const char *src, long tcount);
-extern int	SPI_execp(SPIPlanPtr plan, Datum *Values, const char *Nulls,
+extern int	SPI_execp(SPIPlanPtr plan, Datum *Values, const bool *Nulls,
 					  long tcount);
 extern int	SPI_execute_snapshot(SPIPlanPtr plan,
-								 Datum *Values, const char *Nulls,
+								 Datum *Values, const bool *Nulls,
 								 Snapshot snapshot,
 								 Snapshot crosscheck_snapshot,
 								 bool read_only, bool fire_triggers, long tcount);
 extern int	SPI_execute_with_args(const char *src,
 								  int nargs, Oid *argtypes,
-								  Datum *Values, const char *Nulls,
+								  Datum *Values, const bool *Nulls,
 								  bool read_only, long tcount);
 extern int	SPI_execute_with_receiver(const char *src,
 									  ParamListInfo params,
@@ -161,11 +161,11 @@ extern void SPI_freetuple(HeapTuple pointer);
 extern void SPI_freetuptable(SPITupleTable *tuptable);
 
 extern Portal SPI_cursor_open(const char *name, SPIPlanPtr plan,
-							  Datum *Values, const char *Nulls, bool read_only);
+							  Datum *Values, const bool *Nulls, bool read_only);
 extern Portal SPI_cursor_open_with_args(const char *name,
 										const char *src,
 										int nargs, Oid *argtypes,
-										Datum *Values, const char *Nulls,
+										Datum *Values, const bool *Nulls,
 										bool read_only, int cursorOptions);
 extern Portal SPI_cursor_open_with_paramlist(const char *name, SPIPlanPtr plan,
 											 ParamListInfo params, bool read_only);
diff --git a/src/pl/plperl/plperl.c b/src/pl/plperl/plperl.c
index 6299adf71a..1b8946d9fb 100644
--- a/src/pl/plperl/plperl.c
+++ b/src/pl/plperl/plperl.c
@@ -3806,7 +3806,7 @@ SV *
 plperl_spi_query_prepared(char *query, int argc, SV **argv)
 {
 	int			i;
-	char	   *nulls;
+	bool	   *nulls;
 	Datum	   *argvalues;
 	plperl_query_desc *qdesc;
 	plperl_query_entry *hash_entry;
@@ -3849,7 +3849,7 @@ plperl_spi_query_prepared(char *query, int argc, SV **argv)
 		 ************************************************************/
 		if (argc > 0)
 		{
-			nulls = (char *) palloc(argc);
+			nulls = (bool *) palloc(argc);
 			argvalues = (Datum *) palloc(argc * sizeof(Datum));
 		}
 		else
@@ -3869,7 +3869,7 @@ plperl_spi_query_prepared(char *query, int argc, SV **argv)
 											  &qdesc->arginfuncs[i],
 											  qdesc->argtypioparams[i],
 											  &isnull);
-			nulls[i] = isnull ? 'n' : ' ';
+			nulls[i] = isnull;
 		}
 
 		/************************************************************
diff --git a/src/pl/plpython/plpy_cursorobject.c b/src/pl/plpython/plpy_cursorobject.c
index 08d8b607e3..0918fe0f1f 100644
--- a/src/pl/plpython/plpy_cursorobject.c
+++ b/src/pl/plpython/plpy_cursorobject.c
@@ -201,11 +201,11 @@ PLy_cursor_plan(PyObject *ob, PyObject *args)
 	PG_TRY();
 	{
 		Portal		portal;
-		char	   *volatile nulls;
+		bool	   *volatile nulls;
 		volatile int j;
 
 		if (nargs > 0)
-			nulls = palloc(nargs * sizeof(char));
+			nulls = palloc(nargs * sizeof(bool));
 		else
 			nulls = NULL;
 
@@ -220,7 +220,7 @@ PLy_cursor_plan(PyObject *ob, PyObject *args)
 				bool		isnull;
 
 				plan->values[j] = PLy_output_convert(arg, elem, &isnull);
-				nulls[j] = isnull ? 'n' : ' ';
+				nulls[j] = isnull;
 			}
 			PG_FINALLY();
 			{
diff --git a/src/test/regress/regress.c b/src/test/regress/regress.c
index 32ab9ed6b5..b31202d500 100644
--- a/src/test/regress/regress.c
+++ b/src/test/regress/regress.c
@@ -273,7 +273,7 @@ ttdummy(PG_FUNCTION_ARGS)
 	Datum		newon,
 				newoff;
 	Datum	   *cvals;			/* column values */
-	char	   *cnulls;			/* column nulls */
+	bool	   *cnulls;			/* column nulls */
 	char	   *relname;		/* triggered relation name */
 	Relation	rel;			/* triggered relation */
 	HeapTuple	trigtuple;
@@ -374,27 +374,27 @@ ttdummy(PG_FUNCTION_ARGS)
 
 	/* Fetch tuple values and nulls */
 	cvals = (Datum *) palloc(natts * sizeof(Datum));
-	cnulls = (char *) palloc(natts * sizeof(char));
+	cnulls = (bool *) palloc(natts * sizeof(bool));
 	for (i = 0; i < natts; i++)
 	{
 		cvals[i] = SPI_getbinval((newtuple != NULL) ? newtuple : trigtuple,
 								 tupdesc, i + 1, &isnull);
-		cnulls[i] = (isnull) ? 'n' : ' ';
+		cnulls[i] = isnull;
 	}
 
 	/* change date column(s) */
 	if (newtuple)				/* UPDATE */
 	{
 		cvals[attnum[0] - 1] = newoff;	/* start_date eq current date */
-		cnulls[attnum[0] - 1] = ' ';
+		cnulls[attnum[0] - 1] = false;
 		cvals[attnum[1] - 1] = TTDUMMY_INFINITY;	/* stop_date eq INFINITY */
-		cnulls[attnum[1] - 1] = ' ';
+		cnulls[attnum[1] - 1] = false;
 	}
 	else
 		/* DELETE */
 	{
 		cvals[attnum[1] - 1] = newoff;	/* stop_date eq current date */
-		cnulls[attnum[1] - 1] = ' ';
+		cnulls[attnum[1] - 1] = false;
 	}
 
 	/* if there is no plan ... */
-- 
2.30.0


--=-=-=--





^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Regression tests fail with tzdata 2024b
@ 2024-09-14 13:02 Wolfgang Walther <[email protected]>
  2024-09-14 20:37 ` Re: Regression tests fail with tzdata 2024b Tom Lane <[email protected]>
  0 siblings, 1 reply; 5+ messages in thread

From: Wolfgang Walther @ 2024-09-14 13:02 UTC (permalink / raw)
  To: [email protected]

Building --with-system-tzdata and the latest tzdata 2024b fails the 
regression tests for me (see attached .diffs). This seems to be because 
of [1], which changed the way "PST8PDT" is handled. This is the timezone 
that the regression tests are run with.

 From 2024b on, "PST8PDT" is the same as "America/Los_Angeles", so by 
changing the regression tests to use the latter as the default, we're 
getting consistent output on at least 2024a and 2024b.

Patch attached.

Best,

Wolfgang

[1]: 
https://github.com/eggert/tz/commit/a0b09c0230089252acf2eb0f1ba922e99f7f4a03
diff -U3 /build/source/src/test/regress/expected/date.out /build/source/build/testrun/regress/regress/results/date.out
--- /build/source/src/test/regress/expected/date.out	1970-01-01 00:00:01.000000000 +0000
+++ /build/source/build/testrun/regress/regress/results/date.out	2024-09-13 17:58:09.142429792 +0000
@@ -1295,7 +1295,7 @@
 SELECT DATE_TRUNC('MILLENNIUM', DATE '1970-03-20'); -- 1001-01-01
           date_trunc          
 ------------------------------
- Thu Jan 01 00:00:00 1001 PST
+ Thu Jan 01 00:00:00 1001 LMT
 (1 row)
 
 SELECT DATE_TRUNC('CENTURY', TIMESTAMP '1970-03-20 04:30:00.00000'); -- 1901
@@ -1319,13 +1319,13 @@
 SELECT DATE_TRUNC('CENTURY', DATE '0002-02-04'); -- 0001-01-01
           date_trunc          
 ------------------------------
- Mon Jan 01 00:00:00 0001 PST
+ Mon Jan 01 00:00:00 0001 LMT
 (1 row)
 
 SELECT DATE_TRUNC('CENTURY', DATE '0055-08-10 BC'); -- 0100-01-01 BC
            date_trunc            
 ---------------------------------
- Tue Jan 01 00:00:00 0100 PST BC
+ Tue Jan 01 00:00:00 0100 LMT BC
 (1 row)
 
 SELECT DATE_TRUNC('DECADE', DATE '1993-12-25'); -- 1990-01-01
@@ -1337,13 +1337,13 @@
 SELECT DATE_TRUNC('DECADE', DATE '0004-12-25'); -- 0001-01-01 BC
            date_trunc            
 ---------------------------------
- Sat Jan 01 00:00:00 0001 PST BC
+ Sat Jan 01 00:00:00 0001 LMT BC
 (1 row)
 
 SELECT DATE_TRUNC('DECADE', DATE '0002-12-31 BC'); -- 0011-01-01 BC
            date_trunc            
 ---------------------------------
- Mon Jan 01 00:00:00 0011 PST BC
+ Mon Jan 01 00:00:00 0011 LMT BC
 (1 row)
 
 --
diff -U3 /build/source/src/test/regress/expected/timestamptz.out /build/source/build/testrun/regress/regress/results/timestamptz.out
--- /build/source/src/test/regress/expected/timestamptz.out	1970-01-01 00:00:01.000000000 +0000
+++ /build/source/build/testrun/regress/regress/results/timestamptz.out	2024-09-13 17:58:09.479104285 +0000
@@ -330,12 +330,12 @@
  Fri Feb 14 17:32:01 1997 PST
  Sat Feb 15 17:32:01 1997 PST
  Sun Feb 16 17:32:01 1997 PST
- Tue Feb 16 17:32:01 0097 PST BC
- Sat Feb 16 17:32:01 0097 PST
- Thu Feb 16 17:32:01 0597 PST
- Tue Feb 16 17:32:01 1097 PST
- Sat Feb 16 17:32:01 1697 PST
- Thu Feb 16 17:32:01 1797 PST
+ Tue Feb 16 17:32:01 0097 LMT BC
+ Sat Feb 16 17:32:01 0097 LMT
+ Thu Feb 16 17:32:01 0597 LMT
+ Tue Feb 16 17:32:01 1097 LMT
+ Sat Feb 16 17:32:01 1697 LMT
+ Thu Feb 16 17:32:01 1797 LMT
  Tue Feb 16 17:32:01 1897 PST
  Sun Feb 16 17:32:01 1997 PST
  Sat Feb 16 17:32:01 2097 PST
@@ -359,19 +359,19 @@
 SELECT '4714-11-24 00:00:00+00 BC'::timestamptz;
            timestamptz           
 ---------------------------------
- Sun Nov 23 16:00:00 4714 PST BC
+ Sun Nov 23 16:07:02 4714 LMT BC
 (1 row)
 
 SELECT '4714-11-23 16:00:00-08 BC'::timestamptz;
            timestamptz           
 ---------------------------------
- Sun Nov 23 16:00:00 4714 PST BC
+ Sun Nov 23 16:07:02 4714 LMT BC
 (1 row)
 
 SELECT 'Sun Nov 23 16:00:00 4714 PST BC'::timestamptz;
            timestamptz           
 ---------------------------------
- Sun Nov 23 16:00:00 4714 PST BC
+ Sun Nov 23 16:07:02 4714 LMT BC
 (1 row)
 
 SELECT '4714-11-23 23:59:59+00 BC'::timestamptz;  -- out of range
@@ -461,12 +461,12 @@
 ---------------------------------
  -infinity
  Wed Dec 31 16:00:00 1969 PST
- Tue Feb 16 17:32:01 0097 PST BC
- Sat Feb 16 17:32:01 0097 PST
- Thu Feb 16 17:32:01 0597 PST
- Tue Feb 16 17:32:01 1097 PST
- Sat Feb 16 17:32:01 1697 PST
- Thu Feb 16 17:32:01 1797 PST
+ Tue Feb 16 17:32:01 0097 LMT BC
+ Sat Feb 16 17:32:01 0097 LMT
+ Thu Feb 16 17:32:01 0597 LMT
+ Tue Feb 16 17:32:01 1097 LMT
+ Sat Feb 16 17:32:01 1697 LMT
+ Thu Feb 16 17:32:01 1797 LMT
  Tue Feb 16 17:32:01 1897 PST
  Wed Feb 28 17:32:01 1996 PST
  Thu Feb 29 17:32:01 1996 PST
@@ -529,12 +529,12 @@
  Fri Feb 14 17:32:01 1997 PST
  Sat Feb 15 17:32:01 1997 PST
  Sun Feb 16 17:32:01 1997 PST
- Tue Feb 16 17:32:01 0097 PST BC
- Sat Feb 16 17:32:01 0097 PST
- Thu Feb 16 17:32:01 0597 PST
- Tue Feb 16 17:32:01 1097 PST
- Sat Feb 16 17:32:01 1697 PST
- Thu Feb 16 17:32:01 1797 PST
+ Tue Feb 16 17:32:01 0097 LMT BC
+ Sat Feb 16 17:32:01 0097 LMT
+ Thu Feb 16 17:32:01 0597 LMT
+ Tue Feb 16 17:32:01 1097 LMT
+ Sat Feb 16 17:32:01 1697 LMT
+ Thu Feb 16 17:32:01 1797 LMT
  Tue Feb 16 17:32:01 1897 PST
  Sun Feb 16 17:32:01 1997 PST
  Sat Feb 16 17:32:01 2097 PST
@@ -561,12 +561,12 @@
  -infinity
  Wed Dec 31 16:00:00 1969 PST
  Thu Jan 02 00:00:00 1997 PST
- Tue Feb 16 17:32:01 0097 PST BC
- Sat Feb 16 17:32:01 0097 PST
- Thu Feb 16 17:32:01 0597 PST
- Tue Feb 16 17:32:01 1097 PST
- Sat Feb 16 17:32:01 1697 PST
- Thu Feb 16 17:32:01 1797 PST
+ Tue Feb 16 17:32:01 0097 LMT BC
+ Sat Feb 16 17:32:01 0097 LMT
+ Thu Feb 16 17:32:01 0597 LMT
+ Tue Feb 16 17:32:01 1097 LMT
+ Sat Feb 16 17:32:01 1697 LMT
+ Thu Feb 16 17:32:01 1797 LMT
  Tue Feb 16 17:32:01 1897 PST
  Wed Feb 28 17:32:01 1996 PST
  Thu Feb 29 17:32:01 1996 PST
@@ -920,12 +920,12 @@
  Fri Feb 14 17:32:01 1997 PST    |      1997 |     2 |  14 |   17 |     32 |      1
  Sat Feb 15 17:32:01 1997 PST    |      1997 |     2 |  15 |   17 |     32 |      1
  Sun Feb 16 17:32:01 1997 PST    |      1997 |     2 |  16 |   17 |     32 |      1
- Tue Feb 16 17:32:01 0097 PST BC |       -97 |     2 |  16 |   17 |     32 |      1
- Sat Feb 16 17:32:01 0097 PST    |        97 |     2 |  16 |   17 |     32 |      1
- Thu Feb 16 17:32:01 0597 PST    |       597 |     2 |  16 |   17 |     32 |      1
- Tue Feb 16 17:32:01 1097 PST    |      1097 |     2 |  16 |   17 |     32 |      1
- Sat Feb 16 17:32:01 1697 PST    |      1697 |     2 |  16 |   17 |     32 |      1
- Thu Feb 16 17:32:01 1797 PST    |      1797 |     2 |  16 |   17 |     32 |      1
+ Tue Feb 16 17:32:01 0097 LMT BC |       -97 |     2 |  16 |   17 |     32 |      1
+ Sat Feb 16 17:32:01 0097 LMT    |        97 |     2 |  16 |   17 |     32 |      1
+ Thu Feb 16 17:32:01 0597 LMT    |       597 |     2 |  16 |   17 |     32 |      1
+ Tue Feb 16 17:32:01 1097 LMT    |      1097 |     2 |  16 |   17 |     32 |      1
+ Sat Feb 16 17:32:01 1697 LMT    |      1697 |     2 |  16 |   17 |     32 |      1
+ Thu Feb 16 17:32:01 1797 LMT    |      1797 |     2 |  16 |   17 |     32 |      1
  Tue Feb 16 17:32:01 1897 PST    |      1897 |     2 |  16 |   17 |     32 |      1
  Sun Feb 16 17:32:01 1997 PST    |      1997 |     2 |  16 |   17 |     32 |      1
  Sat Feb 16 17:32:01 2097 PST    |      2097 |     2 |  16 |   17 |     32 |      1
@@ -994,12 +994,12 @@
  Fri Feb 14 17:32:01 1997 PST    |       1 |  1000 |  1000000
  Sat Feb 15 17:32:01 1997 PST    |       1 |  1000 |  1000000
  Sun Feb 16 17:32:01 1997 PST    |       1 |  1000 |  1000000
- Tue Feb 16 17:32:01 0097 PST BC |       1 |  1000 |  1000000
- Sat Feb 16 17:32:01 0097 PST    |       1 |  1000 |  1000000
- Thu Feb 16 17:32:01 0597 PST    |       1 |  1000 |  1000000
- Tue Feb 16 17:32:01 1097 PST    |       1 |  1000 |  1000000
- Sat Feb 16 17:32:01 1697 PST    |       1 |  1000 |  1000000
- Thu Feb 16 17:32:01 1797 PST    |       1 |  1000 |  1000000
+ Tue Feb 16 17:32:01 0097 LMT BC |       1 |  1000 |  1000000
+ Sat Feb 16 17:32:01 0097 LMT    |       1 |  1000 |  1000000
+ Thu Feb 16 17:32:01 0597 LMT    |       1 |  1000 |  1000000
+ Tue Feb 16 17:32:01 1097 LMT    |       1 |  1000 |  1000000
+ Sat Feb 16 17:32:01 1697 LMT    |       1 |  1000 |  1000000
+ Thu Feb 16 17:32:01 1797 LMT    |       1 |  1000 |  1000000
  Tue Feb 16 17:32:01 1897 PST    |       1 |  1000 |  1000000
  Sun Feb 16 17:32:01 1997 PST    |       1 |  1000 |  1000000
  Sat Feb 16 17:32:01 2097 PST    |       1 |  1000 |  1000000
@@ -1069,12 +1069,12 @@
  Fri Feb 14 17:32:01 1997 PST    |      1997 |    7 |      5 |   5 |  45
  Sat Feb 15 17:32:01 1997 PST    |      1997 |    7 |      6 |   6 |  46
  Sun Feb 16 17:32:01 1997 PST    |      1997 |    7 |      7 |   0 |  47
- Tue Feb 16 17:32:01 0097 PST BC |       -97 |    7 |      2 |   2 |  47
- Sat Feb 16 17:32:01 0097 PST    |        97 |    7 |      6 |   6 |  47
- Thu Feb 16 17:32:01 0597 PST    |       597 |    7 |      4 |   4 |  47
- Tue Feb 16 17:32:01 1097 PST    |      1097 |    7 |      2 |   2 |  47
- Sat Feb 16 17:32:01 1697 PST    |      1697 |    7 |      6 |   6 |  47
- Thu Feb 16 17:32:01 1797 PST    |      1797 |    7 |      4 |   4 |  47
+ Tue Feb 16 17:32:01 0097 LMT BC |       -97 |    7 |      2 |   2 |  47
+ Sat Feb 16 17:32:01 0097 LMT    |        97 |    7 |      6 |   6 |  47
+ Thu Feb 16 17:32:01 0597 LMT    |       597 |    7 |      4 |   4 |  47
+ Tue Feb 16 17:32:01 1097 LMT    |      1097 |    7 |      2 |   2 |  47
+ Sat Feb 16 17:32:01 1697 LMT    |      1697 |    7 |      6 |   6 |  47
+ Thu Feb 16 17:32:01 1797 LMT    |      1797 |    7 |      4 |   4 |  47
  Tue Feb 16 17:32:01 1897 PST    |      1897 |    7 |      2 |   2 |  47
  Sun Feb 16 17:32:01 1997 PST    |      1997 |    7 |      7 |   0 |  47
  Sat Feb 16 17:32:01 2097 PST    |      2097 |    7 |      6 |   6 |  47
@@ -1146,12 +1146,12 @@
  Fri Feb 14 17:32:01 1997 PST    |       199 |        20 |          2 |   2450495 |    855970321
  Sat Feb 15 17:32:01 1997 PST    |       199 |        20 |          2 |   2450496 |    856056721
  Sun Feb 16 17:32:01 1997 PST    |       199 |        20 |          2 |   2450497 |    856143121
- Tue Feb 16 17:32:01 0097 PST BC |       -10 |        -1 |         -1 |   1686043 | -65192682479
- Sat Feb 16 17:32:01 0097 PST    |         9 |         1 |          1 |   1756537 | -59102000879
- Thu Feb 16 17:32:01 0597 PST    |        59 |         6 |          1 |   1939158 | -43323546479
- Tue Feb 16 17:32:01 1097 PST    |       109 |        11 |          2 |   2121779 | -27545092079
- Sat Feb 16 17:32:01 1697 PST    |       169 |        17 |          2 |   2340925 |  -8610877679
- Thu Feb 16 17:32:01 1797 PST    |       179 |        18 |          2 |   2377449 |  -5455204079
+ Tue Feb 16 17:32:01 0097 LMT BC |       -10 |        -1 |         -1 |   1686043 | -65192682901
+ Sat Feb 16 17:32:01 0097 LMT    |         9 |         1 |          1 |   1756537 | -59102001301
+ Thu Feb 16 17:32:01 0597 LMT    |        59 |         6 |          1 |   1939158 | -43323546901
+ Tue Feb 16 17:32:01 1097 LMT    |       109 |        11 |          2 |   2121779 | -27545092501
+ Sat Feb 16 17:32:01 1697 LMT    |       169 |        17 |          2 |   2340925 |  -8610878101
+ Thu Feb 16 17:32:01 1797 LMT    |       179 |        18 |          2 |   2377449 |  -5455204501
  Tue Feb 16 17:32:01 1897 PST    |       189 |        19 |          2 |   2413973 |  -2299530479
  Sun Feb 16 17:32:01 1997 PST    |       199 |        20 |          2 |   2450497 |    856143121
  Sat Feb 16 17:32:01 2097 PST    |       209 |        21 |          3 |   2487022 |   4011903121
@@ -1221,12 +1221,12 @@
  Fri Feb 14 17:32:01 1997 PST    |   -28800 |            -8 |               0
  Sat Feb 15 17:32:01 1997 PST    |   -28800 |            -8 |               0
  Sun Feb 16 17:32:01 1997 PST    |   -28800 |            -8 |               0
- Tue Feb 16 17:32:01 0097 PST BC |   -28800 |            -8 |               0
- Sat Feb 16 17:32:01 0097 PST    |   -28800 |            -8 |               0
- Thu Feb 16 17:32:01 0597 PST    |   -28800 |            -8 |               0
- Tue Feb 16 17:32:01 1097 PST    |   -28800 |            -8 |               0
- Sat Feb 16 17:32:01 1697 PST    |   -28800 |            -8 |               0
- Thu Feb 16 17:32:01 1797 PST    |   -28800 |            -8 |               0
+ Tue Feb 16 17:32:01 0097 LMT BC |   -28378 |            -7 |             -52
+ Sat Feb 16 17:32:01 0097 LMT    |   -28378 |            -7 |             -52
+ Thu Feb 16 17:32:01 0597 LMT    |   -28378 |            -7 |             -52
+ Tue Feb 16 17:32:01 1097 LMT    |   -28378 |            -7 |             -52
+ Sat Feb 16 17:32:01 1697 LMT    |   -28378 |            -7 |             -52
+ Thu Feb 16 17:32:01 1797 LMT    |   -28378 |            -7 |             -52
  Tue Feb 16 17:32:01 1897 PST    |   -28800 |            -8 |               0
  Sun Feb 16 17:32:01 1997 PST    |   -28800 |            -8 |               0
  Sat Feb 16 17:32:01 2097 PST    |   -28800 |            -8 |               0
@@ -1300,12 +1300,12 @@
  Fri Feb 14 17:32:01 1997 PST    |      1000000 |     1000.000 |  1.000000 |   2450495 |    855970321.000000
  Sat Feb 15 17:32:01 1997 PST    |      1000000 |     1000.000 |  1.000000 |   2450496 |    856056721.000000
  Sun Feb 16 17:32:01 1997 PST    |      1000000 |     1000.000 |  1.000000 |   2450497 |    856143121.000000
- Tue Feb 16 17:32:01 0097 PST BC |      1000000 |     1000.000 |  1.000000 |   1686043 | -65192682479.000000
- Sat Feb 16 17:32:01 0097 PST    |      1000000 |     1000.000 |  1.000000 |   1756537 | -59102000879.000000
- Thu Feb 16 17:32:01 0597 PST    |      1000000 |     1000.000 |  1.000000 |   1939158 | -43323546479.000000
- Tue Feb 16 17:32:01 1097 PST    |      1000000 |     1000.000 |  1.000000 |   2121779 | -27545092079.000000
- Sat Feb 16 17:32:01 1697 PST    |      1000000 |     1000.000 |  1.000000 |   2340925 |  -8610877679.000000
- Thu Feb 16 17:32:01 1797 PST    |      1000000 |     1000.000 |  1.000000 |   2377449 |  -5455204079.000000
+ Tue Feb 16 17:32:01 0097 LMT BC |      1000000 |     1000.000 |  1.000000 |   1686043 | -65192682901.000000
+ Sat Feb 16 17:32:01 0097 LMT    |      1000000 |     1000.000 |  1.000000 |   1756537 | -59102001301.000000
+ Thu Feb 16 17:32:01 0597 LMT    |      1000000 |     1000.000 |  1.000000 |   1939158 | -43323546901.000000
+ Tue Feb 16 17:32:01 1097 LMT    |      1000000 |     1000.000 |  1.000000 |   2121779 | -27545092501.000000
+ Sat Feb 16 17:32:01 1697 LMT    |      1000000 |     1000.000 |  1.000000 |   2340925 |  -8610878101.000000
+ Thu Feb 16 17:32:01 1797 LMT    |      1000000 |     1000.000 |  1.000000 |   2377449 |  -5455204501.000000
  Tue Feb 16 17:32:01 1897 PST    |      1000000 |     1000.000 |  1.000000 |   2413973 |  -2299530479.000000
  Sun Feb 16 17:32:01 1997 PST    |      1000000 |     1000.000 |  1.000000 |   2450497 |    856143121.000000
  Sat Feb 16 17:32:01 2097 PST    |      1000000 |     1000.000 |  1.000000 |   2487022 |   4011903121.000000
@@ -2304,7 +2304,7 @@
 SELECT * FROM TIMESTAMPTZ_TST ORDER BY a;
  a |               b                
 ---+--------------------------------
- 1 | Wed Mar 12 13:58:48 1000 PST
+ 1 | Wed Mar 12 14:05:50 1000 LMT
  2 | Sun Mar 12 14:58:48 10000 PDT
  3 | Sun Mar 12 14:58:48 100000 PDT
  3 | Sun Mar 12 14:58:48 10000 PDT
diff -U3 /build/source/src/test/regress/expected/horology.out /build/source/build/testrun/regress/regress/results/horology.out
--- /build/source/src/test/regress/expected/horology.out	1970-01-01 00:00:01.000000000 +0000
+++ /build/source/build/testrun/regress/regress/results/horology.out	2024-09-13 17:58:09.785778080 +0000
@@ -1033,12 +1033,12 @@
  Sat Feb 14 17:32:01 1998 PST
  Sun Feb 15 17:32:01 1998 PST
  Mon Feb 16 17:32:01 1998 PST
- Thu Feb 16 17:32:01 0096 PST BC
- Sun Feb 16 17:32:01 0098 PST
- Fri Feb 16 17:32:01 0598 PST
- Wed Feb 16 17:32:01 1098 PST
- Sun Feb 16 17:32:01 1698 PST
- Fri Feb 16 17:32:01 1798 PST
+ Thu Feb 16 17:32:01 0096 LMT BC
+ Sun Feb 16 17:32:01 0098 LMT
+ Fri Feb 16 17:32:01 0598 LMT
+ Wed Feb 16 17:32:01 1098 LMT
+ Sun Feb 16 17:32:01 1698 LMT
+ Fri Feb 16 17:32:01 1798 LMT
  Wed Feb 16 17:32:01 1898 PST
  Mon Feb 16 17:32:01 1998 PST
  Sun Feb 16 17:32:01 2098 PST
@@ -1104,12 +1104,12 @@
  Wed Feb 14 17:32:01 1996 PST
  Thu Feb 15 17:32:01 1996 PST
  Fri Feb 16 17:32:01 1996 PST
- Mon Feb 16 17:32:01 0098 PST BC
- Thu Feb 16 17:32:01 0096 PST
- Tue Feb 16 17:32:01 0596 PST
- Sun Feb 16 17:32:01 1096 PST
- Thu Feb 16 17:32:01 1696 PST
- Tue Feb 16 17:32:01 1796 PST
+ Mon Feb 16 17:32:01 0098 LMT BC
+ Thu Feb 16 17:32:01 0096 LMT
+ Tue Feb 16 17:32:01 0596 LMT
+ Sun Feb 16 17:32:01 1096 LMT
+ Thu Feb 16 17:32:01 1696 LMT
+ Tue Feb 16 17:32:01 1796 LMT
  Sun Feb 16 17:32:01 1896 PST
  Fri Feb 16 17:32:01 1996 PST
  Thu Feb 16 17:32:01 2096 PST
@@ -2388,7 +2388,7 @@
 SELECT '4714-11-24 BC'::date::timestamptz;
            timestamptz           
 ---------------------------------
- Mon Nov 24 00:00:00 4714 PST BC
+ Mon Nov 24 00:00:00 4714 LMT BC
 (1 row)
 
 SET TimeZone = 'UTC-2';
@@ -2966,13 +2966,13 @@
 SELECT to_timestamp('0097/Feb/16 --> 08:14:30', 'YYYY/Mon/DD --> HH:MI:SS');
          to_timestamp         
 ------------------------------
- Sat Feb 16 08:14:30 0097 PST
+ Sat Feb 16 08:14:30 0097 LMT
 (1 row)
 
 SELECT to_timestamp('97/2/16 8:14:30', 'FMYYYY/FMMM/FMDD FMHH:FMMI:FMSS');
          to_timestamp         
 ------------------------------
- Sat Feb 16 08:14:30 0097 PST
+ Sat Feb 16 08:14:30 0097 LMT
 (1 row)
 
 SELECT to_timestamp('2011$03!18 23_38_15', 'YYYY-MM-DD HH24:MI:SS');
@@ -3009,7 +3009,7 @@
 SELECT to_timestamp('1,582nd VIII 21', 'Y,YYYth FMRM DD');
          to_timestamp         
 ------------------------------
- Sat Aug 21 00:00:00 1582 PST
+ Sat Aug 21 00:00:00 1582 LMT
 (1 row)
 
 SELECT to_timestamp('15 "text between quote marks" 98 54 45',
@@ -3073,7 +3073,7 @@
 SELECT to_timestamp('1997 BC 11 16', 'YYYY BC MM DD');
           to_timestamp           
 ---------------------------------
- Tue Nov 16 00:00:00 1997 PST BC
+ Tue Nov 16 00:00:00 1997 LMT BC
 (1 row)
 
 SELECT to_timestamp('1997 A.D. 11 16', 'YYYY B.C. MM DD');
@@ -3085,7 +3085,7 @@
 SELECT to_timestamp('1997 B.C. 11 16', 'YYYY B.C. MM DD');
           to_timestamp           
 ---------------------------------
- Tue Nov 16 00:00:00 1997 PST BC
+ Tue Nov 16 00:00:00 1997 LMT BC
 (1 row)
 
 SELECT to_timestamp('9-1116', 'Y-MMDD');
@@ -3355,19 +3355,19 @@
 SELECT to_timestamp('44-02-01 11:12:13 BC','YYYY-MM-DD HH24:MI:SS BC');
           to_timestamp           
 ---------------------------------
- Fri Feb 01 11:12:13 0044 PST BC
+ Fri Feb 01 11:12:13 0044 LMT BC
 (1 row)
 
 SELECT to_timestamp('-44-02-01 11:12:13','YYYY-MM-DD HH24:MI:SS');
           to_timestamp           
 ---------------------------------
- Fri Feb 01 11:12:13 0044 PST BC
+ Fri Feb 01 11:12:13 0044 LMT BC
 (1 row)
 
 SELECT to_timestamp('-44-02-01 11:12:13 BC','YYYY-MM-DD HH24:MI:SS BC');
          to_timestamp         
 ------------------------------
- Mon Feb 01 11:12:13 0044 PST
+ Mon Feb 01 11:12:13 0044 LMT
 (1 row)
 
 --


Attachments:

  [text/plain] regression.diffs (17.9K, ../../[email protected]/2-regression.diffs)
  download | inline:
diff -U3 /build/source/src/test/regress/expected/date.out /build/source/build/testrun/regress/regress/results/date.out
--- /build/source/src/test/regress/expected/date.out	1970-01-01 00:00:01.000000000 +0000
+++ /build/source/build/testrun/regress/regress/results/date.out	2024-09-13 17:58:09.142429792 +0000
@@ -1295,7 +1295,7 @@
 SELECT DATE_TRUNC('MILLENNIUM', DATE '1970-03-20'); -- 1001-01-01
           date_trunc          
 ------------------------------
- Thu Jan 01 00:00:00 1001 PST
+ Thu Jan 01 00:00:00 1001 LMT
 (1 row)
 
 SELECT DATE_TRUNC('CENTURY', TIMESTAMP '1970-03-20 04:30:00.00000'); -- 1901
@@ -1319,13 +1319,13 @@
 SELECT DATE_TRUNC('CENTURY', DATE '0002-02-04'); -- 0001-01-01
           date_trunc          
 ------------------------------
- Mon Jan 01 00:00:00 0001 PST
+ Mon Jan 01 00:00:00 0001 LMT
 (1 row)
 
 SELECT DATE_TRUNC('CENTURY', DATE '0055-08-10 BC'); -- 0100-01-01 BC
            date_trunc            
 ---------------------------------
- Tue Jan 01 00:00:00 0100 PST BC
+ Tue Jan 01 00:00:00 0100 LMT BC
 (1 row)
 
 SELECT DATE_TRUNC('DECADE', DATE '1993-12-25'); -- 1990-01-01
@@ -1337,13 +1337,13 @@
 SELECT DATE_TRUNC('DECADE', DATE '0004-12-25'); -- 0001-01-01 BC
            date_trunc            
 ---------------------------------
- Sat Jan 01 00:00:00 0001 PST BC
+ Sat Jan 01 00:00:00 0001 LMT BC
 (1 row)
 
 SELECT DATE_TRUNC('DECADE', DATE '0002-12-31 BC'); -- 0011-01-01 BC
            date_trunc            
 ---------------------------------
- Mon Jan 01 00:00:00 0011 PST BC
+ Mon Jan 01 00:00:00 0011 LMT BC
 (1 row)
 
 --
diff -U3 /build/source/src/test/regress/expected/timestamptz.out /build/source/build/testrun/regress/regress/results/timestamptz.out
--- /build/source/src/test/regress/expected/timestamptz.out	1970-01-01 00:00:01.000000000 +0000
+++ /build/source/build/testrun/regress/regress/results/timestamptz.out	2024-09-13 17:58:09.479104285 +0000
@@ -330,12 +330,12 @@
  Fri Feb 14 17:32:01 1997 PST
  Sat Feb 15 17:32:01 1997 PST
  Sun Feb 16 17:32:01 1997 PST
- Tue Feb 16 17:32:01 0097 PST BC
- Sat Feb 16 17:32:01 0097 PST
- Thu Feb 16 17:32:01 0597 PST
- Tue Feb 16 17:32:01 1097 PST
- Sat Feb 16 17:32:01 1697 PST
- Thu Feb 16 17:32:01 1797 PST
+ Tue Feb 16 17:32:01 0097 LMT BC
+ Sat Feb 16 17:32:01 0097 LMT
+ Thu Feb 16 17:32:01 0597 LMT
+ Tue Feb 16 17:32:01 1097 LMT
+ Sat Feb 16 17:32:01 1697 LMT
+ Thu Feb 16 17:32:01 1797 LMT
  Tue Feb 16 17:32:01 1897 PST
  Sun Feb 16 17:32:01 1997 PST
  Sat Feb 16 17:32:01 2097 PST
@@ -359,19 +359,19 @@
 SELECT '4714-11-24 00:00:00+00 BC'::timestamptz;
            timestamptz           
 ---------------------------------
- Sun Nov 23 16:00:00 4714 PST BC
+ Sun Nov 23 16:07:02 4714 LMT BC
 (1 row)
 
 SELECT '4714-11-23 16:00:00-08 BC'::timestamptz;
            timestamptz           
 ---------------------------------
- Sun Nov 23 16:00:00 4714 PST BC
+ Sun Nov 23 16:07:02 4714 LMT BC
 (1 row)
 
 SELECT 'Sun Nov 23 16:00:00 4714 PST BC'::timestamptz;
            timestamptz           
 ---------------------------------
- Sun Nov 23 16:00:00 4714 PST BC
+ Sun Nov 23 16:07:02 4714 LMT BC
 (1 row)
 
 SELECT '4714-11-23 23:59:59+00 BC'::timestamptz;  -- out of range
@@ -461,12 +461,12 @@
 ---------------------------------
  -infinity
  Wed Dec 31 16:00:00 1969 PST
- Tue Feb 16 17:32:01 0097 PST BC
- Sat Feb 16 17:32:01 0097 PST
- Thu Feb 16 17:32:01 0597 PST
- Tue Feb 16 17:32:01 1097 PST
- Sat Feb 16 17:32:01 1697 PST
- Thu Feb 16 17:32:01 1797 PST
+ Tue Feb 16 17:32:01 0097 LMT BC
+ Sat Feb 16 17:32:01 0097 LMT
+ Thu Feb 16 17:32:01 0597 LMT
+ Tue Feb 16 17:32:01 1097 LMT
+ Sat Feb 16 17:32:01 1697 LMT
+ Thu Feb 16 17:32:01 1797 LMT
  Tue Feb 16 17:32:01 1897 PST
  Wed Feb 28 17:32:01 1996 PST
  Thu Feb 29 17:32:01 1996 PST
@@ -529,12 +529,12 @@
  Fri Feb 14 17:32:01 1997 PST
  Sat Feb 15 17:32:01 1997 PST
  Sun Feb 16 17:32:01 1997 PST
- Tue Feb 16 17:32:01 0097 PST BC
- Sat Feb 16 17:32:01 0097 PST
- Thu Feb 16 17:32:01 0597 PST
- Tue Feb 16 17:32:01 1097 PST
- Sat Feb 16 17:32:01 1697 PST
- Thu Feb 16 17:32:01 1797 PST
+ Tue Feb 16 17:32:01 0097 LMT BC
+ Sat Feb 16 17:32:01 0097 LMT
+ Thu Feb 16 17:32:01 0597 LMT
+ Tue Feb 16 17:32:01 1097 LMT
+ Sat Feb 16 17:32:01 1697 LMT
+ Thu Feb 16 17:32:01 1797 LMT
  Tue Feb 16 17:32:01 1897 PST
  Sun Feb 16 17:32:01 1997 PST
  Sat Feb 16 17:32:01 2097 PST
@@ -561,12 +561,12 @@
  -infinity
  Wed Dec 31 16:00:00 1969 PST
  Thu Jan 02 00:00:00 1997 PST
- Tue Feb 16 17:32:01 0097 PST BC
- Sat Feb 16 17:32:01 0097 PST
- Thu Feb 16 17:32:01 0597 PST
- Tue Feb 16 17:32:01 1097 PST
- Sat Feb 16 17:32:01 1697 PST
- Thu Feb 16 17:32:01 1797 PST
+ Tue Feb 16 17:32:01 0097 LMT BC
+ Sat Feb 16 17:32:01 0097 LMT
+ Thu Feb 16 17:32:01 0597 LMT
+ Tue Feb 16 17:32:01 1097 LMT
+ Sat Feb 16 17:32:01 1697 LMT
+ Thu Feb 16 17:32:01 1797 LMT
  Tue Feb 16 17:32:01 1897 PST
  Wed Feb 28 17:32:01 1996 PST
  Thu Feb 29 17:32:01 1996 PST
@@ -920,12 +920,12 @@
  Fri Feb 14 17:32:01 1997 PST    |      1997 |     2 |  14 |   17 |     32 |      1
  Sat Feb 15 17:32:01 1997 PST    |      1997 |     2 |  15 |   17 |     32 |      1
  Sun Feb 16 17:32:01 1997 PST    |      1997 |     2 |  16 |   17 |     32 |      1
- Tue Feb 16 17:32:01 0097 PST BC |       -97 |     2 |  16 |   17 |     32 |      1
- Sat Feb 16 17:32:01 0097 PST    |        97 |     2 |  16 |   17 |     32 |      1
- Thu Feb 16 17:32:01 0597 PST    |       597 |     2 |  16 |   17 |     32 |      1
- Tue Feb 16 17:32:01 1097 PST    |      1097 |     2 |  16 |   17 |     32 |      1
- Sat Feb 16 17:32:01 1697 PST    |      1697 |     2 |  16 |   17 |     32 |      1
- Thu Feb 16 17:32:01 1797 PST    |      1797 |     2 |  16 |   17 |     32 |      1
+ Tue Feb 16 17:32:01 0097 LMT BC |       -97 |     2 |  16 |   17 |     32 |      1
+ Sat Feb 16 17:32:01 0097 LMT    |        97 |     2 |  16 |   17 |     32 |      1
+ Thu Feb 16 17:32:01 0597 LMT    |       597 |     2 |  16 |   17 |     32 |      1
+ Tue Feb 16 17:32:01 1097 LMT    |      1097 |     2 |  16 |   17 |     32 |      1
+ Sat Feb 16 17:32:01 1697 LMT    |      1697 |     2 |  16 |   17 |     32 |      1
+ Thu Feb 16 17:32:01 1797 LMT    |      1797 |     2 |  16 |   17 |     32 |      1
  Tue Feb 16 17:32:01 1897 PST    |      1897 |     2 |  16 |   17 |     32 |      1
  Sun Feb 16 17:32:01 1997 PST    |      1997 |     2 |  16 |   17 |     32 |      1
  Sat Feb 16 17:32:01 2097 PST    |      2097 |     2 |  16 |   17 |     32 |      1
@@ -994,12 +994,12 @@
  Fri Feb 14 17:32:01 1997 PST    |       1 |  1000 |  1000000
  Sat Feb 15 17:32:01 1997 PST    |       1 |  1000 |  1000000
  Sun Feb 16 17:32:01 1997 PST    |       1 |  1000 |  1000000
- Tue Feb 16 17:32:01 0097 PST BC |       1 |  1000 |  1000000
- Sat Feb 16 17:32:01 0097 PST    |       1 |  1000 |  1000000
- Thu Feb 16 17:32:01 0597 PST    |       1 |  1000 |  1000000
- Tue Feb 16 17:32:01 1097 PST    |       1 |  1000 |  1000000
- Sat Feb 16 17:32:01 1697 PST    |       1 |  1000 |  1000000
- Thu Feb 16 17:32:01 1797 PST    |       1 |  1000 |  1000000
+ Tue Feb 16 17:32:01 0097 LMT BC |       1 |  1000 |  1000000
+ Sat Feb 16 17:32:01 0097 LMT    |       1 |  1000 |  1000000
+ Thu Feb 16 17:32:01 0597 LMT    |       1 |  1000 |  1000000
+ Tue Feb 16 17:32:01 1097 LMT    |       1 |  1000 |  1000000
+ Sat Feb 16 17:32:01 1697 LMT    |       1 |  1000 |  1000000
+ Thu Feb 16 17:32:01 1797 LMT    |       1 |  1000 |  1000000
  Tue Feb 16 17:32:01 1897 PST    |       1 |  1000 |  1000000
  Sun Feb 16 17:32:01 1997 PST    |       1 |  1000 |  1000000
  Sat Feb 16 17:32:01 2097 PST    |       1 |  1000 |  1000000
@@ -1069,12 +1069,12 @@
  Fri Feb 14 17:32:01 1997 PST    |      1997 |    7 |      5 |   5 |  45
  Sat Feb 15 17:32:01 1997 PST    |      1997 |    7 |      6 |   6 |  46
  Sun Feb 16 17:32:01 1997 PST    |      1997 |    7 |      7 |   0 |  47
- Tue Feb 16 17:32:01 0097 PST BC |       -97 |    7 |      2 |   2 |  47
- Sat Feb 16 17:32:01 0097 PST    |        97 |    7 |      6 |   6 |  47
- Thu Feb 16 17:32:01 0597 PST    |       597 |    7 |      4 |   4 |  47
- Tue Feb 16 17:32:01 1097 PST    |      1097 |    7 |      2 |   2 |  47
- Sat Feb 16 17:32:01 1697 PST    |      1697 |    7 |      6 |   6 |  47
- Thu Feb 16 17:32:01 1797 PST    |      1797 |    7 |      4 |   4 |  47
+ Tue Feb 16 17:32:01 0097 LMT BC |       -97 |    7 |      2 |   2 |  47
+ Sat Feb 16 17:32:01 0097 LMT    |        97 |    7 |      6 |   6 |  47
+ Thu Feb 16 17:32:01 0597 LMT    |       597 |    7 |      4 |   4 |  47
+ Tue Feb 16 17:32:01 1097 LMT    |      1097 |    7 |      2 |   2 |  47
+ Sat Feb 16 17:32:01 1697 LMT    |      1697 |    7 |      6 |   6 |  47
+ Thu Feb 16 17:32:01 1797 LMT    |      1797 |    7 |      4 |   4 |  47
  Tue Feb 16 17:32:01 1897 PST    |      1897 |    7 |      2 |   2 |  47
  Sun Feb 16 17:32:01 1997 PST    |      1997 |    7 |      7 |   0 |  47
  Sat Feb 16 17:32:01 2097 PST    |      2097 |    7 |      6 |   6 |  47
@@ -1146,12 +1146,12 @@
  Fri Feb 14 17:32:01 1997 PST    |       199 |        20 |          2 |   2450495 |    855970321
  Sat Feb 15 17:32:01 1997 PST    |       199 |        20 |          2 |   2450496 |    856056721
  Sun Feb 16 17:32:01 1997 PST    |       199 |        20 |          2 |   2450497 |    856143121
- Tue Feb 16 17:32:01 0097 PST BC |       -10 |        -1 |         -1 |   1686043 | -65192682479
- Sat Feb 16 17:32:01 0097 PST    |         9 |         1 |          1 |   1756537 | -59102000879
- Thu Feb 16 17:32:01 0597 PST    |        59 |         6 |          1 |   1939158 | -43323546479
- Tue Feb 16 17:32:01 1097 PST    |       109 |        11 |          2 |   2121779 | -27545092079
- Sat Feb 16 17:32:01 1697 PST    |       169 |        17 |          2 |   2340925 |  -8610877679
- Thu Feb 16 17:32:01 1797 PST    |       179 |        18 |          2 |   2377449 |  -5455204079
+ Tue Feb 16 17:32:01 0097 LMT BC |       -10 |        -1 |         -1 |   1686043 | -65192682901
+ Sat Feb 16 17:32:01 0097 LMT    |         9 |         1 |          1 |   1756537 | -59102001301
+ Thu Feb 16 17:32:01 0597 LMT    |        59 |         6 |          1 |   1939158 | -43323546901
+ Tue Feb 16 17:32:01 1097 LMT    |       109 |        11 |          2 |   2121779 | -27545092501
+ Sat Feb 16 17:32:01 1697 LMT    |       169 |        17 |          2 |   2340925 |  -8610878101
+ Thu Feb 16 17:32:01 1797 LMT    |       179 |        18 |          2 |   2377449 |  -5455204501
  Tue Feb 16 17:32:01 1897 PST    |       189 |        19 |          2 |   2413973 |  -2299530479
  Sun Feb 16 17:32:01 1997 PST    |       199 |        20 |          2 |   2450497 |    856143121
  Sat Feb 16 17:32:01 2097 PST    |       209 |        21 |          3 |   2487022 |   4011903121
@@ -1221,12 +1221,12 @@
  Fri Feb 14 17:32:01 1997 PST    |   -28800 |            -8 |               0
  Sat Feb 15 17:32:01 1997 PST    |   -28800 |            -8 |               0
  Sun Feb 16 17:32:01 1997 PST    |   -28800 |            -8 |               0
- Tue Feb 16 17:32:01 0097 PST BC |   -28800 |            -8 |               0
- Sat Feb 16 17:32:01 0097 PST    |   -28800 |            -8 |               0
- Thu Feb 16 17:32:01 0597 PST    |   -28800 |            -8 |               0
- Tue Feb 16 17:32:01 1097 PST    |   -28800 |            -8 |               0
- Sat Feb 16 17:32:01 1697 PST    |   -28800 |            -8 |               0
- Thu Feb 16 17:32:01 1797 PST    |   -28800 |            -8 |               0
+ Tue Feb 16 17:32:01 0097 LMT BC |   -28378 |            -7 |             -52
+ Sat Feb 16 17:32:01 0097 LMT    |   -28378 |            -7 |             -52
+ Thu Feb 16 17:32:01 0597 LMT    |   -28378 |            -7 |             -52
+ Tue Feb 16 17:32:01 1097 LMT    |   -28378 |            -7 |             -52
+ Sat Feb 16 17:32:01 1697 LMT    |   -28378 |            -7 |             -52
+ Thu Feb 16 17:32:01 1797 LMT    |   -28378 |            -7 |             -52
  Tue Feb 16 17:32:01 1897 PST    |   -28800 |            -8 |               0
  Sun Feb 16 17:32:01 1997 PST    |   -28800 |            -8 |               0
  Sat Feb 16 17:32:01 2097 PST    |   -28800 |            -8 |               0
@@ -1300,12 +1300,12 @@
  Fri Feb 14 17:32:01 1997 PST    |      1000000 |     1000.000 |  1.000000 |   2450495 |    855970321.000000
  Sat Feb 15 17:32:01 1997 PST    |      1000000 |     1000.000 |  1.000000 |   2450496 |    856056721.000000
  Sun Feb 16 17:32:01 1997 PST    |      1000000 |     1000.000 |  1.000000 |   2450497 |    856143121.000000
- Tue Feb 16 17:32:01 0097 PST BC |      1000000 |     1000.000 |  1.000000 |   1686043 | -65192682479.000000
- Sat Feb 16 17:32:01 0097 PST    |      1000000 |     1000.000 |  1.000000 |   1756537 | -59102000879.000000
- Thu Feb 16 17:32:01 0597 PST    |      1000000 |     1000.000 |  1.000000 |   1939158 | -43323546479.000000
- Tue Feb 16 17:32:01 1097 PST    |      1000000 |     1000.000 |  1.000000 |   2121779 | -27545092079.000000
- Sat Feb 16 17:32:01 1697 PST    |      1000000 |     1000.000 |  1.000000 |   2340925 |  -8610877679.000000
- Thu Feb 16 17:32:01 1797 PST    |      1000000 |     1000.000 |  1.000000 |   2377449 |  -5455204079.000000
+ Tue Feb 16 17:32:01 0097 LMT BC |      1000000 |     1000.000 |  1.000000 |   1686043 | -65192682901.000000
+ Sat Feb 16 17:32:01 0097 LMT    |      1000000 |     1000.000 |  1.000000 |   1756537 | -59102001301.000000
+ Thu Feb 16 17:32:01 0597 LMT    |      1000000 |     1000.000 |  1.000000 |   1939158 | -43323546901.000000
+ Tue Feb 16 17:32:01 1097 LMT    |      1000000 |     1000.000 |  1.000000 |   2121779 | -27545092501.000000
+ Sat Feb 16 17:32:01 1697 LMT    |      1000000 |     1000.000 |  1.000000 |   2340925 |  -8610878101.000000
+ Thu Feb 16 17:32:01 1797 LMT    |      1000000 |     1000.000 |  1.000000 |   2377449 |  -5455204501.000000
  Tue Feb 16 17:32:01 1897 PST    |      1000000 |     1000.000 |  1.000000 |   2413973 |  -2299530479.000000
  Sun Feb 16 17:32:01 1997 PST    |      1000000 |     1000.000 |  1.000000 |   2450497 |    856143121.000000
  Sat Feb 16 17:32:01 2097 PST    |      1000000 |     1000.000 |  1.000000 |   2487022 |   4011903121.000000
@@ -2304,7 +2304,7 @@
 SELECT * FROM TIMESTAMPTZ_TST ORDER BY a;
  a |               b                
 ---+--------------------------------
- 1 | Wed Mar 12 13:58:48 1000 PST
+ 1 | Wed Mar 12 14:05:50 1000 LMT
  2 | Sun Mar 12 14:58:48 10000 PDT
  3 | Sun Mar 12 14:58:48 100000 PDT
  3 | Sun Mar 12 14:58:48 10000 PDT
diff -U3 /build/source/src/test/regress/expected/horology.out /build/source/build/testrun/regress/regress/results/horology.out
--- /build/source/src/test/regress/expected/horology.out	1970-01-01 00:00:01.000000000 +0000
+++ /build/source/build/testrun/regress/regress/results/horology.out	2024-09-13 17:58:09.785778080 +0000
@@ -1033,12 +1033,12 @@
  Sat Feb 14 17:32:01 1998 PST
  Sun Feb 15 17:32:01 1998 PST
  Mon Feb 16 17:32:01 1998 PST
- Thu Feb 16 17:32:01 0096 PST BC
- Sun Feb 16 17:32:01 0098 PST
- Fri Feb 16 17:32:01 0598 PST
- Wed Feb 16 17:32:01 1098 PST
- Sun Feb 16 17:32:01 1698 PST
- Fri Feb 16 17:32:01 1798 PST
+ Thu Feb 16 17:32:01 0096 LMT BC
+ Sun Feb 16 17:32:01 0098 LMT
+ Fri Feb 16 17:32:01 0598 LMT
+ Wed Feb 16 17:32:01 1098 LMT
+ Sun Feb 16 17:32:01 1698 LMT
+ Fri Feb 16 17:32:01 1798 LMT
  Wed Feb 16 17:32:01 1898 PST
  Mon Feb 16 17:32:01 1998 PST
  Sun Feb 16 17:32:01 2098 PST
@@ -1104,12 +1104,12 @@
  Wed Feb 14 17:32:01 1996 PST
  Thu Feb 15 17:32:01 1996 PST
  Fri Feb 16 17:32:01 1996 PST
- Mon Feb 16 17:32:01 0098 PST BC
- Thu Feb 16 17:32:01 0096 PST
- Tue Feb 16 17:32:01 0596 PST
- Sun Feb 16 17:32:01 1096 PST
- Thu Feb 16 17:32:01 1696 PST
- Tue Feb 16 17:32:01 1796 PST
+ Mon Feb 16 17:32:01 0098 LMT BC
+ Thu Feb 16 17:32:01 0096 LMT
+ Tue Feb 16 17:32:01 0596 LMT
+ Sun Feb 16 17:32:01 1096 LMT
+ Thu Feb 16 17:32:01 1696 LMT
+ Tue Feb 16 17:32:01 1796 LMT
  Sun Feb 16 17:32:01 1896 PST
  Fri Feb 16 17:32:01 1996 PST
  Thu Feb 16 17:32:01 2096 PST
@@ -2388,7 +2388,7 @@
 SELECT '4714-11-24 BC'::date::timestamptz;
            timestamptz           
 ---------------------------------
- Mon Nov 24 00:00:00 4714 PST BC
+ Mon Nov 24 00:00:00 4714 LMT BC
 (1 row)
 
 SET TimeZone = 'UTC-2';
@@ -2966,13 +2966,13 @@
 SELECT to_timestamp('0097/Feb/16 --> 08:14:30', 'YYYY/Mon/DD --> HH:MI:SS');
          to_timestamp         
 ------------------------------
- Sat Feb 16 08:14:30 0097 PST
+ Sat Feb 16 08:14:30 0097 LMT
 (1 row)
 
 SELECT to_timestamp('97/2/16 8:14:30', 'FMYYYY/FMMM/FMDD FMHH:FMMI:FMSS');
          to_timestamp         
 ------------------------------
- Sat Feb 16 08:14:30 0097 PST
+ Sat Feb 16 08:14:30 0097 LMT
 (1 row)
 
 SELECT to_timestamp('2011$03!18 23_38_15', 'YYYY-MM-DD HH24:MI:SS');
@@ -3009,7 +3009,7 @@
 SELECT to_timestamp('1,582nd VIII 21', 'Y,YYYth FMRM DD');
          to_timestamp         
 ------------------------------
- Sat Aug 21 00:00:00 1582 PST
+ Sat Aug 21 00:00:00 1582 LMT
 (1 row)
 
 SELECT to_timestamp('15 "text between quote marks" 98 54 45',
@@ -3073,7 +3073,7 @@
 SELECT to_timestamp('1997 BC 11 16', 'YYYY BC MM DD');
           to_timestamp           
 ---------------------------------
- Tue Nov 16 00:00:00 1997 PST BC
+ Tue Nov 16 00:00:00 1997 LMT BC
 (1 row)
 
 SELECT to_timestamp('1997 A.D. 11 16', 'YYYY B.C. MM DD');
@@ -3085,7 +3085,7 @@
 SELECT to_timestamp('1997 B.C. 11 16', 'YYYY B.C. MM DD');
           to_timestamp           
 ---------------------------------
- Tue Nov 16 00:00:00 1997 PST BC
+ Tue Nov 16 00:00:00 1997 LMT BC
 (1 row)
 
 SELECT to_timestamp('9-1116', 'Y-MMDD');
@@ -3355,19 +3355,19 @@
 SELECT to_timestamp('44-02-01 11:12:13 BC','YYYY-MM-DD HH24:MI:SS BC');
           to_timestamp           
 ---------------------------------
- Fri Feb 01 11:12:13 0044 PST BC
+ Fri Feb 01 11:12:13 0044 LMT BC
 (1 row)
 
 SELECT to_timestamp('-44-02-01 11:12:13','YYYY-MM-DD HH24:MI:SS');
           to_timestamp           
 ---------------------------------
- Fri Feb 01 11:12:13 0044 PST BC
+ Fri Feb 01 11:12:13 0044 LMT BC
 (1 row)
 
 SELECT to_timestamp('-44-02-01 11:12:13 BC','YYYY-MM-DD HH24:MI:SS BC');
          to_timestamp         
 ------------------------------
- Mon Feb 01 11:12:13 0044 PST
+ Mon Feb 01 11:12:13 0044 LMT
 (1 row)
 
 --

  [text/x-patch] v1-0001-Run-regression-tests-with-timezone-America-Los_An.patch (20.9K, ../../[email protected]/3-v1-0001-Run-regression-tests-with-timezone-America-Los_An.patch)
  download | inline diff:
From c5de73fbb86f7d600c90ba42ab9bd3d4eca34d1b Mon Sep 17 00:00:00 2001
From: Wolfgang Walther <[email protected]>
Date: Sat, 14 Sep 2024 14:42:38 +0200
Subject: [PATCH v1] Run regression tests with timezone America/Los_Angeles

Previously, the regression tests were running with "PST8PDT", which was
changed to link to America/Los_Angeles in tzdata 2024b.  Running the
tests --with-system-tzdata=2024b would therefore fail.

Run the regression tests with America/Los_Angeles to get consistent
output in both 2024a and 2024b.
---
 doc/src/sgml/regress.sgml                 |   4 +-
 src/test/regress/expected/date.out        |  10 +-
 src/test/regress/expected/horology.out    |  48 ++++----
 src/test/regress/expected/timestamptz.out | 128 +++++++++++-----------
 src/test/regress/pg_regress.c             |   2 +-
 5 files changed, 96 insertions(+), 96 deletions(-)

diff --git a/doc/src/sgml/regress.sgml b/doc/src/sgml/regress.sgml
index d1042e02228..948e9bdd7cf 100644
--- a/doc/src/sgml/regress.sgml
+++ b/doc/src/sgml/regress.sgml
@@ -576,10 +576,10 @@ make check NO_LOCALE=1
     <para>
      Most of the date and time results are dependent on the time zone
      environment.  The reference files are generated for time zone
-     <literal>PST8PDT</literal> (Berkeley, California), and there will be
+     <literal>America/Los_Angeles</literal>, and there will be
      apparent failures if the tests are not run with that time zone setting.
      The regression test driver sets environment variable
-     <envar>PGTZ</envar> to <literal>PST8PDT</literal>, which normally
+     <envar>PGTZ</envar> to <literal>America/Los_Angeles</literal>, which normally
      ensures proper results.
     </para>
    </sect2>
diff --git a/src/test/regress/expected/date.out b/src/test/regress/expected/date.out
index f5949f3d174..20374c5230a 100644
--- a/src/test/regress/expected/date.out
+++ b/src/test/regress/expected/date.out
@@ -1295,7 +1295,7 @@ SELECT DATE_TRUNC('MILLENNIUM', TIMESTAMP '1970-03-20 04:30:00.00000'); -- 1001
 SELECT DATE_TRUNC('MILLENNIUM', DATE '1970-03-20'); -- 1001-01-01
           date_trunc          
 ------------------------------
- Thu Jan 01 00:00:00 1001 PST
+ Thu Jan 01 00:00:00 1001 LMT
 (1 row)
 
 SELECT DATE_TRUNC('CENTURY', TIMESTAMP '1970-03-20 04:30:00.00000'); -- 1901
@@ -1319,13 +1319,13 @@ SELECT DATE_TRUNC('CENTURY', DATE '2004-08-10'); -- 2001-01-01
 SELECT DATE_TRUNC('CENTURY', DATE '0002-02-04'); -- 0001-01-01
           date_trunc          
 ------------------------------
- Mon Jan 01 00:00:00 0001 PST
+ Mon Jan 01 00:00:00 0001 LMT
 (1 row)
 
 SELECT DATE_TRUNC('CENTURY', DATE '0055-08-10 BC'); -- 0100-01-01 BC
            date_trunc            
 ---------------------------------
- Tue Jan 01 00:00:00 0100 PST BC
+ Tue Jan 01 00:00:00 0100 LMT BC
 (1 row)
 
 SELECT DATE_TRUNC('DECADE', DATE '1993-12-25'); -- 1990-01-01
@@ -1337,13 +1337,13 @@ SELECT DATE_TRUNC('DECADE', DATE '1993-12-25'); -- 1990-01-01
 SELECT DATE_TRUNC('DECADE', DATE '0004-12-25'); -- 0001-01-01 BC
            date_trunc            
 ---------------------------------
- Sat Jan 01 00:00:00 0001 PST BC
+ Sat Jan 01 00:00:00 0001 LMT BC
 (1 row)
 
 SELECT DATE_TRUNC('DECADE', DATE '0002-12-31 BC'); -- 0011-01-01 BC
            date_trunc            
 ---------------------------------
- Mon Jan 01 00:00:00 0011 PST BC
+ Mon Jan 01 00:00:00 0011 LMT BC
 (1 row)
 
 --
diff --git a/src/test/regress/expected/horology.out b/src/test/regress/expected/horology.out
index 58da26ab0e1..82c0e1a12f2 100644
--- a/src/test/regress/expected/horology.out
+++ b/src/test/regress/expected/horology.out
@@ -2,9 +2,9 @@
 -- HOROLOGY
 --
 SHOW TimeZone;  -- Many of these tests depend on the prevailing settings
- TimeZone 
-----------
- PST8PDT
+      TimeZone       
+---------------------
+ America/Los_Angeles
 (1 row)
 
 SHOW DateStyle;
@@ -1038,12 +1038,12 @@ SELECT d1 + interval '1 year' AS one_year FROM TIMESTAMPTZ_TBL;
  Sat Feb 14 17:32:01 1998 PST
  Sun Feb 15 17:32:01 1998 PST
  Mon Feb 16 17:32:01 1998 PST
- Thu Feb 16 17:32:01 0096 PST BC
- Sun Feb 16 17:32:01 0098 PST
- Fri Feb 16 17:32:01 0598 PST
- Wed Feb 16 17:32:01 1098 PST
- Sun Feb 16 17:32:01 1698 PST
- Fri Feb 16 17:32:01 1798 PST
+ Thu Feb 16 17:32:01 0096 LMT BC
+ Sun Feb 16 17:32:01 0098 LMT
+ Fri Feb 16 17:32:01 0598 LMT
+ Wed Feb 16 17:32:01 1098 LMT
+ Sun Feb 16 17:32:01 1698 LMT
+ Fri Feb 16 17:32:01 1798 LMT
  Wed Feb 16 17:32:01 1898 PST
  Mon Feb 16 17:32:01 1998 PST
  Sun Feb 16 17:32:01 2098 PST
@@ -1109,12 +1109,12 @@ SELECT d1 - interval '1 year' AS one_year FROM TIMESTAMPTZ_TBL;
  Wed Feb 14 17:32:01 1996 PST
  Thu Feb 15 17:32:01 1996 PST
  Fri Feb 16 17:32:01 1996 PST
- Mon Feb 16 17:32:01 0098 PST BC
- Thu Feb 16 17:32:01 0096 PST
- Tue Feb 16 17:32:01 0596 PST
- Sun Feb 16 17:32:01 1096 PST
- Thu Feb 16 17:32:01 1696 PST
- Tue Feb 16 17:32:01 1796 PST
+ Mon Feb 16 17:32:01 0098 LMT BC
+ Thu Feb 16 17:32:01 0096 LMT
+ Tue Feb 16 17:32:01 0596 LMT
+ Sun Feb 16 17:32:01 1096 LMT
+ Thu Feb 16 17:32:01 1696 LMT
+ Tue Feb 16 17:32:01 1796 LMT
  Sun Feb 16 17:32:01 1896 PST
  Fri Feb 16 17:32:01 1996 PST
  Thu Feb 16 17:32:01 2096 PST
@@ -2470,7 +2470,7 @@ SELECT '2020-10-05'::timestamptz > '2202020-10-05'::date as f;
 SELECT '4714-11-24 BC'::date::timestamptz;
            timestamptz           
 ---------------------------------
- Mon Nov 24 00:00:00 4714 PST BC
+ Mon Nov 24 00:00:00 4714 LMT BC
 (1 row)
 
 SET TimeZone = 'UTC-2';
@@ -3048,13 +3048,13 @@ RESET DateStyle;
 SELECT to_timestamp('0097/Feb/16 --> 08:14:30', 'YYYY/Mon/DD --> HH:MI:SS');
          to_timestamp         
 ------------------------------
- Sat Feb 16 08:14:30 0097 PST
+ Sat Feb 16 08:14:30 0097 LMT
 (1 row)
 
 SELECT to_timestamp('97/2/16 8:14:30', 'FMYYYY/FMMM/FMDD FMHH:FMMI:FMSS');
          to_timestamp         
 ------------------------------
- Sat Feb 16 08:14:30 0097 PST
+ Sat Feb 16 08:14:30 0097 LMT
 (1 row)
 
 SELECT to_timestamp('2011$03!18 23_38_15', 'YYYY-MM-DD HH24:MI:SS');
@@ -3091,7 +3091,7 @@ SELECT to_timestamp('My birthday-> Year: 1976, Month: May, Day: 16',
 SELECT to_timestamp('1,582nd VIII 21', 'Y,YYYth FMRM DD');
          to_timestamp         
 ------------------------------
- Sat Aug 21 00:00:00 1582 PST
+ Sat Aug 21 00:00:00 1582 LMT
 (1 row)
 
 SELECT to_timestamp('15 "text between quote marks" 98 54 45',
@@ -3155,7 +3155,7 @@ SELECT to_timestamp('1997 AD 11 16', 'YYYY BC MM DD');
 SELECT to_timestamp('1997 BC 11 16', 'YYYY BC MM DD');
           to_timestamp           
 ---------------------------------
- Tue Nov 16 00:00:00 1997 PST BC
+ Tue Nov 16 00:00:00 1997 LMT BC
 (1 row)
 
 SELECT to_timestamp('1997 A.D. 11 16', 'YYYY B.C. MM DD');
@@ -3167,7 +3167,7 @@ SELECT to_timestamp('1997 A.D. 11 16', 'YYYY B.C. MM DD');
 SELECT to_timestamp('1997 B.C. 11 16', 'YYYY B.C. MM DD');
           to_timestamp           
 ---------------------------------
- Tue Nov 16 00:00:00 1997 PST BC
+ Tue Nov 16 00:00:00 1997 LMT BC
 (1 row)
 
 SELECT to_timestamp('9-1116', 'Y-MMDD');
@@ -3495,19 +3495,19 @@ SELECT to_date('-44-02-01 BC','YYYY-MM-DD BC');
 SELECT to_timestamp('44-02-01 11:12:13 BC','YYYY-MM-DD HH24:MI:SS BC');
           to_timestamp           
 ---------------------------------
- Fri Feb 01 11:12:13 0044 PST BC
+ Fri Feb 01 11:12:13 0044 LMT BC
 (1 row)
 
 SELECT to_timestamp('-44-02-01 11:12:13','YYYY-MM-DD HH24:MI:SS');
           to_timestamp           
 ---------------------------------
- Fri Feb 01 11:12:13 0044 PST BC
+ Fri Feb 01 11:12:13 0044 LMT BC
 (1 row)
 
 SELECT to_timestamp('-44-02-01 11:12:13 BC','YYYY-MM-DD HH24:MI:SS BC');
          to_timestamp         
 ------------------------------
- Mon Feb 01 11:12:13 0044 PST
+ Mon Feb 01 11:12:13 0044 LMT
 (1 row)
 
 --
diff --git a/src/test/regress/expected/timestamptz.out b/src/test/regress/expected/timestamptz.out
index d01d174983e..5e5d601a35d 100644
--- a/src/test/regress/expected/timestamptz.out
+++ b/src/test/regress/expected/timestamptz.out
@@ -330,12 +330,12 @@ SELECT d1 FROM TIMESTAMPTZ_TBL;
  Fri Feb 14 17:32:01 1997 PST
  Sat Feb 15 17:32:01 1997 PST
  Sun Feb 16 17:32:01 1997 PST
- Tue Feb 16 17:32:01 0097 PST BC
- Sat Feb 16 17:32:01 0097 PST
- Thu Feb 16 17:32:01 0597 PST
- Tue Feb 16 17:32:01 1097 PST
- Sat Feb 16 17:32:01 1697 PST
- Thu Feb 16 17:32:01 1797 PST
+ Tue Feb 16 17:32:01 0097 LMT BC
+ Sat Feb 16 17:32:01 0097 LMT
+ Thu Feb 16 17:32:01 0597 LMT
+ Tue Feb 16 17:32:01 1097 LMT
+ Sat Feb 16 17:32:01 1697 LMT
+ Thu Feb 16 17:32:01 1797 LMT
  Tue Feb 16 17:32:01 1897 PST
  Sun Feb 16 17:32:01 1997 PST
  Sat Feb 16 17:32:01 2097 PST
@@ -359,19 +359,19 @@ SELECT d1 FROM TIMESTAMPTZ_TBL;
 SELECT '4714-11-24 00:00:00+00 BC'::timestamptz;
            timestamptz           
 ---------------------------------
- Sun Nov 23 16:00:00 4714 PST BC
+ Sun Nov 23 16:07:02 4714 LMT BC
 (1 row)
 
 SELECT '4714-11-23 16:00:00-08 BC'::timestamptz;
            timestamptz           
 ---------------------------------
- Sun Nov 23 16:00:00 4714 PST BC
+ Sun Nov 23 16:07:02 4714 LMT BC
 (1 row)
 
 SELECT 'Sun Nov 23 16:00:00 4714 PST BC'::timestamptz;
            timestamptz           
 ---------------------------------
- Sun Nov 23 16:00:00 4714 PST BC
+ Sun Nov 23 16:07:02 4714 LMT BC
 (1 row)
 
 SELECT '4714-11-23 23:59:59+00 BC'::timestamptz;  -- out of range
@@ -461,12 +461,12 @@ SELECT d1 FROM TIMESTAMPTZ_TBL
 ---------------------------------
  -infinity
  Wed Dec 31 16:00:00 1969 PST
- Tue Feb 16 17:32:01 0097 PST BC
- Sat Feb 16 17:32:01 0097 PST
- Thu Feb 16 17:32:01 0597 PST
- Tue Feb 16 17:32:01 1097 PST
- Sat Feb 16 17:32:01 1697 PST
- Thu Feb 16 17:32:01 1797 PST
+ Tue Feb 16 17:32:01 0097 LMT BC
+ Sat Feb 16 17:32:01 0097 LMT
+ Thu Feb 16 17:32:01 0597 LMT
+ Tue Feb 16 17:32:01 1097 LMT
+ Sat Feb 16 17:32:01 1697 LMT
+ Thu Feb 16 17:32:01 1797 LMT
  Tue Feb 16 17:32:01 1897 PST
  Wed Feb 28 17:32:01 1996 PST
  Thu Feb 29 17:32:01 1996 PST
@@ -529,12 +529,12 @@ SELECT d1 FROM TIMESTAMPTZ_TBL
  Fri Feb 14 17:32:01 1997 PST
  Sat Feb 15 17:32:01 1997 PST
  Sun Feb 16 17:32:01 1997 PST
- Tue Feb 16 17:32:01 0097 PST BC
- Sat Feb 16 17:32:01 0097 PST
- Thu Feb 16 17:32:01 0597 PST
- Tue Feb 16 17:32:01 1097 PST
- Sat Feb 16 17:32:01 1697 PST
- Thu Feb 16 17:32:01 1797 PST
+ Tue Feb 16 17:32:01 0097 LMT BC
+ Sat Feb 16 17:32:01 0097 LMT
+ Thu Feb 16 17:32:01 0597 LMT
+ Tue Feb 16 17:32:01 1097 LMT
+ Sat Feb 16 17:32:01 1697 LMT
+ Thu Feb 16 17:32:01 1797 LMT
  Tue Feb 16 17:32:01 1897 PST
  Sun Feb 16 17:32:01 1997 PST
  Sat Feb 16 17:32:01 2097 PST
@@ -561,12 +561,12 @@ SELECT d1 FROM TIMESTAMPTZ_TBL
  -infinity
  Wed Dec 31 16:00:00 1969 PST
  Thu Jan 02 00:00:00 1997 PST
- Tue Feb 16 17:32:01 0097 PST BC
- Sat Feb 16 17:32:01 0097 PST
- Thu Feb 16 17:32:01 0597 PST
- Tue Feb 16 17:32:01 1097 PST
- Sat Feb 16 17:32:01 1697 PST
- Thu Feb 16 17:32:01 1797 PST
+ Tue Feb 16 17:32:01 0097 LMT BC
+ Sat Feb 16 17:32:01 0097 LMT
+ Thu Feb 16 17:32:01 0597 LMT
+ Tue Feb 16 17:32:01 1097 LMT
+ Sat Feb 16 17:32:01 1697 LMT
+ Thu Feb 16 17:32:01 1797 LMT
  Tue Feb 16 17:32:01 1897 PST
  Wed Feb 28 17:32:01 1996 PST
  Thu Feb 29 17:32:01 1996 PST
@@ -920,12 +920,12 @@ SELECT d1 as timestamptz,
  Fri Feb 14 17:32:01 1997 PST    |      1997 |     2 |  14 |   17 |     32 |      1
  Sat Feb 15 17:32:01 1997 PST    |      1997 |     2 |  15 |   17 |     32 |      1
  Sun Feb 16 17:32:01 1997 PST    |      1997 |     2 |  16 |   17 |     32 |      1
- Tue Feb 16 17:32:01 0097 PST BC |       -97 |     2 |  16 |   17 |     32 |      1
- Sat Feb 16 17:32:01 0097 PST    |        97 |     2 |  16 |   17 |     32 |      1
- Thu Feb 16 17:32:01 0597 PST    |       597 |     2 |  16 |   17 |     32 |      1
- Tue Feb 16 17:32:01 1097 PST    |      1097 |     2 |  16 |   17 |     32 |      1
- Sat Feb 16 17:32:01 1697 PST    |      1697 |     2 |  16 |   17 |     32 |      1
- Thu Feb 16 17:32:01 1797 PST    |      1797 |     2 |  16 |   17 |     32 |      1
+ Tue Feb 16 17:32:01 0097 LMT BC |       -97 |     2 |  16 |   17 |     32 |      1
+ Sat Feb 16 17:32:01 0097 LMT    |        97 |     2 |  16 |   17 |     32 |      1
+ Thu Feb 16 17:32:01 0597 LMT    |       597 |     2 |  16 |   17 |     32 |      1
+ Tue Feb 16 17:32:01 1097 LMT    |      1097 |     2 |  16 |   17 |     32 |      1
+ Sat Feb 16 17:32:01 1697 LMT    |      1697 |     2 |  16 |   17 |     32 |      1
+ Thu Feb 16 17:32:01 1797 LMT    |      1797 |     2 |  16 |   17 |     32 |      1
  Tue Feb 16 17:32:01 1897 PST    |      1897 |     2 |  16 |   17 |     32 |      1
  Sun Feb 16 17:32:01 1997 PST    |      1997 |     2 |  16 |   17 |     32 |      1
  Sat Feb 16 17:32:01 2097 PST    |      2097 |     2 |  16 |   17 |     32 |      1
@@ -994,12 +994,12 @@ SELECT d1 as timestamptz,
  Fri Feb 14 17:32:01 1997 PST    |       1 |  1000 |  1000000
  Sat Feb 15 17:32:01 1997 PST    |       1 |  1000 |  1000000
  Sun Feb 16 17:32:01 1997 PST    |       1 |  1000 |  1000000
- Tue Feb 16 17:32:01 0097 PST BC |       1 |  1000 |  1000000
- Sat Feb 16 17:32:01 0097 PST    |       1 |  1000 |  1000000
- Thu Feb 16 17:32:01 0597 PST    |       1 |  1000 |  1000000
- Tue Feb 16 17:32:01 1097 PST    |       1 |  1000 |  1000000
- Sat Feb 16 17:32:01 1697 PST    |       1 |  1000 |  1000000
- Thu Feb 16 17:32:01 1797 PST    |       1 |  1000 |  1000000
+ Tue Feb 16 17:32:01 0097 LMT BC |       1 |  1000 |  1000000
+ Sat Feb 16 17:32:01 0097 LMT    |       1 |  1000 |  1000000
+ Thu Feb 16 17:32:01 0597 LMT    |       1 |  1000 |  1000000
+ Tue Feb 16 17:32:01 1097 LMT    |       1 |  1000 |  1000000
+ Sat Feb 16 17:32:01 1697 LMT    |       1 |  1000 |  1000000
+ Thu Feb 16 17:32:01 1797 LMT    |       1 |  1000 |  1000000
  Tue Feb 16 17:32:01 1897 PST    |       1 |  1000 |  1000000
  Sun Feb 16 17:32:01 1997 PST    |       1 |  1000 |  1000000
  Sat Feb 16 17:32:01 2097 PST    |       1 |  1000 |  1000000
@@ -1069,12 +1069,12 @@ SELECT d1 as timestamptz,
  Fri Feb 14 17:32:01 1997 PST    |      1997 |    7 |      5 |   5 |  45
  Sat Feb 15 17:32:01 1997 PST    |      1997 |    7 |      6 |   6 |  46
  Sun Feb 16 17:32:01 1997 PST    |      1997 |    7 |      7 |   0 |  47
- Tue Feb 16 17:32:01 0097 PST BC |       -97 |    7 |      2 |   2 |  47
- Sat Feb 16 17:32:01 0097 PST    |        97 |    7 |      6 |   6 |  47
- Thu Feb 16 17:32:01 0597 PST    |       597 |    7 |      4 |   4 |  47
- Tue Feb 16 17:32:01 1097 PST    |      1097 |    7 |      2 |   2 |  47
- Sat Feb 16 17:32:01 1697 PST    |      1697 |    7 |      6 |   6 |  47
- Thu Feb 16 17:32:01 1797 PST    |      1797 |    7 |      4 |   4 |  47
+ Tue Feb 16 17:32:01 0097 LMT BC |       -97 |    7 |      2 |   2 |  47
+ Sat Feb 16 17:32:01 0097 LMT    |        97 |    7 |      6 |   6 |  47
+ Thu Feb 16 17:32:01 0597 LMT    |       597 |    7 |      4 |   4 |  47
+ Tue Feb 16 17:32:01 1097 LMT    |      1097 |    7 |      2 |   2 |  47
+ Sat Feb 16 17:32:01 1697 LMT    |      1697 |    7 |      6 |   6 |  47
+ Thu Feb 16 17:32:01 1797 LMT    |      1797 |    7 |      4 |   4 |  47
  Tue Feb 16 17:32:01 1897 PST    |      1897 |    7 |      2 |   2 |  47
  Sun Feb 16 17:32:01 1997 PST    |      1997 |    7 |      7 |   0 |  47
  Sat Feb 16 17:32:01 2097 PST    |      2097 |    7 |      6 |   6 |  47
@@ -1146,12 +1146,12 @@ SELECT d1 as timestamptz,
  Fri Feb 14 17:32:01 1997 PST    |       199 |        20 |          2 |   2450495 |    855970321
  Sat Feb 15 17:32:01 1997 PST    |       199 |        20 |          2 |   2450496 |    856056721
  Sun Feb 16 17:32:01 1997 PST    |       199 |        20 |          2 |   2450497 |    856143121
- Tue Feb 16 17:32:01 0097 PST BC |       -10 |        -1 |         -1 |   1686043 | -65192682479
- Sat Feb 16 17:32:01 0097 PST    |         9 |         1 |          1 |   1756537 | -59102000879
- Thu Feb 16 17:32:01 0597 PST    |        59 |         6 |          1 |   1939158 | -43323546479
- Tue Feb 16 17:32:01 1097 PST    |       109 |        11 |          2 |   2121779 | -27545092079
- Sat Feb 16 17:32:01 1697 PST    |       169 |        17 |          2 |   2340925 |  -8610877679
- Thu Feb 16 17:32:01 1797 PST    |       179 |        18 |          2 |   2377449 |  -5455204079
+ Tue Feb 16 17:32:01 0097 LMT BC |       -10 |        -1 |         -1 |   1686043 | -65192682901
+ Sat Feb 16 17:32:01 0097 LMT    |         9 |         1 |          1 |   1756537 | -59102001301
+ Thu Feb 16 17:32:01 0597 LMT    |        59 |         6 |          1 |   1939158 | -43323546901
+ Tue Feb 16 17:32:01 1097 LMT    |       109 |        11 |          2 |   2121779 | -27545092501
+ Sat Feb 16 17:32:01 1697 LMT    |       169 |        17 |          2 |   2340925 |  -8610878101
+ Thu Feb 16 17:32:01 1797 LMT    |       179 |        18 |          2 |   2377449 |  -5455204501
  Tue Feb 16 17:32:01 1897 PST    |       189 |        19 |          2 |   2413973 |  -2299530479
  Sun Feb 16 17:32:01 1997 PST    |       199 |        20 |          2 |   2450497 |    856143121
  Sat Feb 16 17:32:01 2097 PST    |       209 |        21 |          3 |   2487022 |   4011903121
@@ -1221,12 +1221,12 @@ SELECT d1 as timestamptz,
  Fri Feb 14 17:32:01 1997 PST    |   -28800 |            -8 |               0
  Sat Feb 15 17:32:01 1997 PST    |   -28800 |            -8 |               0
  Sun Feb 16 17:32:01 1997 PST    |   -28800 |            -8 |               0
- Tue Feb 16 17:32:01 0097 PST BC |   -28800 |            -8 |               0
- Sat Feb 16 17:32:01 0097 PST    |   -28800 |            -8 |               0
- Thu Feb 16 17:32:01 0597 PST    |   -28800 |            -8 |               0
- Tue Feb 16 17:32:01 1097 PST    |   -28800 |            -8 |               0
- Sat Feb 16 17:32:01 1697 PST    |   -28800 |            -8 |               0
- Thu Feb 16 17:32:01 1797 PST    |   -28800 |            -8 |               0
+ Tue Feb 16 17:32:01 0097 LMT BC |   -28378 |            -7 |             -52
+ Sat Feb 16 17:32:01 0097 LMT    |   -28378 |            -7 |             -52
+ Thu Feb 16 17:32:01 0597 LMT    |   -28378 |            -7 |             -52
+ Tue Feb 16 17:32:01 1097 LMT    |   -28378 |            -7 |             -52
+ Sat Feb 16 17:32:01 1697 LMT    |   -28378 |            -7 |             -52
+ Thu Feb 16 17:32:01 1797 LMT    |   -28378 |            -7 |             -52
  Tue Feb 16 17:32:01 1897 PST    |   -28800 |            -8 |               0
  Sun Feb 16 17:32:01 1997 PST    |   -28800 |            -8 |               0
  Sat Feb 16 17:32:01 2097 PST    |   -28800 |            -8 |               0
@@ -1300,12 +1300,12 @@ SELECT d1 as "timestamp",
  Fri Feb 14 17:32:01 1997 PST    |      1000000 |     1000.000 |  1.000000 |   2450495 |    855970321.000000
  Sat Feb 15 17:32:01 1997 PST    |      1000000 |     1000.000 |  1.000000 |   2450496 |    856056721.000000
  Sun Feb 16 17:32:01 1997 PST    |      1000000 |     1000.000 |  1.000000 |   2450497 |    856143121.000000
- Tue Feb 16 17:32:01 0097 PST BC |      1000000 |     1000.000 |  1.000000 |   1686043 | -65192682479.000000
- Sat Feb 16 17:32:01 0097 PST    |      1000000 |     1000.000 |  1.000000 |   1756537 | -59102000879.000000
- Thu Feb 16 17:32:01 0597 PST    |      1000000 |     1000.000 |  1.000000 |   1939158 | -43323546479.000000
- Tue Feb 16 17:32:01 1097 PST    |      1000000 |     1000.000 |  1.000000 |   2121779 | -27545092079.000000
- Sat Feb 16 17:32:01 1697 PST    |      1000000 |     1000.000 |  1.000000 |   2340925 |  -8610877679.000000
- Thu Feb 16 17:32:01 1797 PST    |      1000000 |     1000.000 |  1.000000 |   2377449 |  -5455204079.000000
+ Tue Feb 16 17:32:01 0097 LMT BC |      1000000 |     1000.000 |  1.000000 |   1686043 | -65192682901.000000
+ Sat Feb 16 17:32:01 0097 LMT    |      1000000 |     1000.000 |  1.000000 |   1756537 | -59102001301.000000
+ Thu Feb 16 17:32:01 0597 LMT    |      1000000 |     1000.000 |  1.000000 |   1939158 | -43323546901.000000
+ Tue Feb 16 17:32:01 1097 LMT    |      1000000 |     1000.000 |  1.000000 |   2121779 | -27545092501.000000
+ Sat Feb 16 17:32:01 1697 LMT    |      1000000 |     1000.000 |  1.000000 |   2340925 |  -8610878101.000000
+ Thu Feb 16 17:32:01 1797 LMT    |      1000000 |     1000.000 |  1.000000 |   2377449 |  -5455204501.000000
  Tue Feb 16 17:32:01 1897 PST    |      1000000 |     1000.000 |  1.000000 |   2413973 |  -2299530479.000000
  Sun Feb 16 17:32:01 1997 PST    |      1000000 |     1000.000 |  1.000000 |   2450497 |    856143121.000000
  Sat Feb 16 17:32:01 2097 PST    |      1000000 |     1000.000 |  1.000000 |   2487022 |   4011903121.000000
@@ -2304,7 +2304,7 @@ INSERT INTO TIMESTAMPTZ_TST VALUES(4, '1000000312 23:58:48 IST');
 SELECT * FROM TIMESTAMPTZ_TST ORDER BY a;
  a |               b                
 ---+--------------------------------
- 1 | Wed Mar 12 13:58:48 1000 PST
+ 1 | Wed Mar 12 14:05:50 1000 LMT
  2 | Sun Mar 12 14:58:48 10000 PDT
  3 | Sun Mar 12 14:58:48 100000 PDT
  3 | Sun Mar 12 14:58:48 10000 PDT
diff --git a/src/test/regress/pg_regress.c b/src/test/regress/pg_regress.c
index 69a0caffa47..5157629b1cc 100644
--- a/src/test/regress/pg_regress.c
+++ b/src/test/regress/pg_regress.c
@@ -776,7 +776,7 @@ initialize_environment(void)
 	/*
 	 * Set timezone and datestyle for datetime-related tests
 	 */
-	setenv("PGTZ", "PST8PDT", 1);
+	setenv("PGTZ", "America/Los_Angeles", 1);
 	setenv("PGDATESTYLE", "Postgres, MDY", 1);
 
 	/*
-- 
2.46.0



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Regression tests fail with tzdata 2024b
  2024-09-14 13:02 Regression tests fail with tzdata 2024b Wolfgang Walther <[email protected]>
@ 2024-09-14 20:37 ` Tom Lane <[email protected]>
  2024-09-15 09:08   ` Re: Regression tests fail with tzdata 2024b Wolfgang Walther <[email protected]>
  0 siblings, 1 reply; 5+ messages in thread

From: Tom Lane @ 2024-09-14 20:37 UTC (permalink / raw)
  To: Wolfgang Walther <[email protected]>; +Cc: [email protected]

Wolfgang Walther <[email protected]> writes:
> Building --with-system-tzdata and the latest tzdata 2024b fails the 
> regression tests for me (see attached .diffs). This seems to be because 
> of [1], which changed the way "PST8PDT" is handled. This is the timezone 
> that the regression tests are run with.

That's quite annoying, especially since it was not mentioned in the
2024b release notes.  (I had read the notes and concluded that 2024b
didn't require any immediate attention on our part.)

>  From 2024b on, "PST8PDT" is the same as "America/Los_Angeles", so by 
> changing the regression tests to use the latter as the default, we're 
> getting consistent output on at least 2024a and 2024b.

I'm fairly un-thrilled with this answer, not least because it exposes
that zone's idiosyncratic "LMT" offset of -7:52:58 for years before
1883.  (I'm surprised that that seems to affect only one or two
regression results.)  Also, as a real place to a greater extent
than "PST8PDT" is, it's more subject to historical revisionism when
somebody turns up evidence of local law having been different than
TZDB currently thinks.

We may not have a lot of choice though.  I experimented with using
full POSIX notation, that is "PST8PDT,M3.2.0,M11.1.0", but that is
actually worse in terms of the number of test diffs, since it doesn't
match the DST transition dates that the tests expect for years before
2007.  Another objection is that the tests would then not exercise any
of the mainstream tzdb-file-reading code paths within the timezone
code itself.

Grumble.

			regards, tom lane






^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Regression tests fail with tzdata 2024b
  2024-09-14 13:02 Regression tests fail with tzdata 2024b Wolfgang Walther <[email protected]>
  2024-09-14 20:37 ` Re: Regression tests fail with tzdata 2024b Tom Lane <[email protected]>
@ 2024-09-15 09:08   ` Wolfgang Walther <[email protected]>
  2024-09-16 05:09     ` Re: Regression tests fail with tzdata 2024b Tom Lane <[email protected]>
  0 siblings, 1 reply; 5+ messages in thread

From: Wolfgang Walther @ 2024-09-15 09:08 UTC (permalink / raw)
  To: Tom Lane <[email protected]>; +Cc: [email protected]

Tom Lane:
> Also, as a real place to a greater extent
> than "PST8PDT" is, it's more subject to historical revisionism when
> somebody turns up evidence of local law having been different than
> TZDB currently thinks.

I now tried all versions of tzdata which we had in tree back to 2018g, 
they all work fine with the same regression test output. 2018g was an 
arbitrary cutoff, I just didn't try any further.

In the end, we don't need a default timezone that will never change. We 
just need one that didn't change in a reasonable number of releases 
going backwards. Once America/Los_Angeles is changed, we need to switch 
to a different zone, which could be one that wouldn't work today. Kind 
of a sliding window.

One positive might be: With this timezone, we are more likely to see 
relevant changes mentioned in the upstream release notes.

Best,

Wolfgang






^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Regression tests fail with tzdata 2024b
  2024-09-14 13:02 Regression tests fail with tzdata 2024b Wolfgang Walther <[email protected]>
  2024-09-14 20:37 ` Re: Regression tests fail with tzdata 2024b Tom Lane <[email protected]>
  2024-09-15 09:08   ` Re: Regression tests fail with tzdata 2024b Wolfgang Walther <[email protected]>
@ 2024-09-16 05:09     ` Tom Lane <[email protected]>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2024-09-16 05:09 UTC (permalink / raw)
  To: Wolfgang Walther <[email protected]>; +Cc: [email protected]

Wolfgang Walther <[email protected]> writes:
> Tom Lane:
>> Also, as a real place to a greater extent
>> than "PST8PDT" is, it's more subject to historical revisionism when
>> somebody turns up evidence of local law having been different than
>> TZDB currently thinks.

> I now tried all versions of tzdata which we had in tree back to 2018g, 
> they all work fine with the same regression test output. 2018g was an 
> arbitrary cutoff, I just didn't try any further.

Yeah, my belly-aching above is just about hypothetical future
instability.  In reality, I'm sure America/Los_Angeles is pretty
well researched and so it's unlikely that there will be unexpected
changes in its zone history.

> In the end, we don't need a default timezone that will never change.

We do, really.  For example, there's a nonzero chance the USA will
cancel DST altogether at some future time.  (This would be driven by
politicians who don't remember the last time, but there's no shortage
of those.)  That'd likely break some of our test results, and even if
it happened not to, it'd still be bad because we'd probably lose some
coverage of the DST-transition-related code paths in src/timezone/.
So I'd really be way happier with a test timezone that never changes
but does include DST behavior.  I thought PST8PDT fit those
requirements pretty well, and I'm annoyed at Eggert for having tossed
it overboard for no benefit whatever.  But I don't run tzdb, so
here we are.

> We just need one that didn't change in a reasonable number of
> releases going backwards.

We've had this sort of fire-drill before, e.g. commit 8d7af8fbe.
It's no fun, and the potential surface area for unexpected changes
is now much greater than the few tests affected by that change.

But here we are, so I pushed your patch with a couple of other
cosmetic bits.  There are still a couple of references to PST8PDT
in the tree, but they don't appear to care what the actual meaning
of that zone is, so I left them be.

			regards, tom lane






^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2024-09-16 05:09 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-01-19 07:51 [PATCH v1] Replace the char to bool array for null parameters Japin Li <[email protected]>
2024-09-14 13:02 Regression tests fail with tzdata 2024b Wolfgang Walther <[email protected]>
2024-09-14 20:37 ` Re: Regression tests fail with tzdata 2024b Tom Lane <[email protected]>
2024-09-15 09:08   ` Re: Regression tests fail with tzdata 2024b Wolfgang Walther <[email protected]>
2024-09-16 05:09     ` Re: Regression tests fail with tzdata 2024b Tom Lane <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox