From 5e6004135b5bdcd4197ff0275d77ca2a3b08e8c7 Mon Sep 17 00:00:00 2001
From: Tom Lane <tgl@sss.pgh.pa.us>
Date: Sat, 15 Jan 2000 19:18:24 +0000
Subject: [PATCH] Now that new psql is fflush()'ing properly, it emerges that
 several regress test expected outputs were committed with NOTICEs appearing
 out of order.  Update to correct results.

---
 src/test/regress/expected/errors.out          |  4 ++--
 .../expected/horology-no-DST-before-1970.out  | 24 +++++++++----------
 src/test/regress/expected/horology.out        | 24 +++++++++----------
 src/test/regress/expected/join.out            |  8 +++----
 src/test/regress/expected/triggers.out        |  8 +++----
 src/test/regress/output/constraints.source    | 10 ++++----
 .../regress/output/create_function_1.source   |  2 +-
 7 files changed, 40 insertions(+), 40 deletions(-)

diff --git a/src/test/regress/expected/errors.out b/src/test/regress/expected/errors.out
index a2e56bb3154..6a280f321a5 100644
--- a/src/test/regress/expected/errors.out
+++ b/src/test/regress/expected/errors.out
@@ -92,11 +92,11 @@ ERROR:  renameatt: attribute "oid" exists
 -- TRANSACTION STUFF
  
 -- not in a xact 
-NOTICE:  UserAbortTransactionBlock and not in in-progress state
 abort;
+NOTICE:  UserAbortTransactionBlock and not in in-progress state
 -- not in a xact 
-NOTICE:  EndTransactionBlock and not inprogress/abort state 
 end;
+NOTICE:  EndTransactionBlock and not inprogress/abort state 
 --
 -- DEFINE AGGREGATE
  
diff --git a/src/test/regress/expected/horology-no-DST-before-1970.out b/src/test/regress/expected/horology-no-DST-before-1970.out
index c6e22b67a96..7462b22bc65 100644
--- a/src/test/regress/expected/horology-no-DST-before-1970.out
+++ b/src/test/regress/expected/horology-no-DST-before-1970.out
@@ -572,8 +572,8 @@ DROP TABLE TEMP_DATETIME;
 -- formats
 --
 SET DateStyle TO 'US,Postgres';
-NOTICE:  DateStyle is Postgres with US (NonEuropean) conventions
 SHOW DateStyle;
+NOTICE:  DateStyle is Postgres with US (NonEuropean) conventions
 SELECT '' AS sixty_two, d1 AS us_postgres FROM DATETIME_TBL;
  sixty_two |           us_postgres           
 -----------+---------------------------------
@@ -734,8 +734,8 @@ SELECT '' AS eight, f1 AS us_iso FROM ABSTIME_TBL;
 (8 rows)
 
 SET DateStyle TO 'US,SQL';
-NOTICE:  DateStyle is SQL with US (NonEuropean) conventions
 SHOW DateStyle;
+NOTICE:  DateStyle is SQL with US (NonEuropean) conventions
 SELECT '' AS sixty_two, d1 AS us_sql FROM DATETIME_TBL;
  sixty_two |           us_sql           
 -----------+----------------------------
@@ -816,8 +816,8 @@ SELECT '' AS eight, f1 AS us_sql FROM ABSTIME_TBL;
 (8 rows)
 
 SET DateStyle TO 'European,Postgres';
-NOTICE:  DateStyle is Postgres with European conventions
 SHOW DateStyle;
+NOTICE:  DateStyle is Postgres with European conventions
 INSERT INTO DATETIME_TBL VALUES('13/06/1957');
 SELECT count(*) as one FROM DATETIME_TBL WHERE d1 = 'Jun 13 1957';
  one 
@@ -906,8 +906,8 @@ SELECT '' AS eight, f1 AS european_postgres FROM ABSTIME_TBL;
 (8 rows)
 
 SET DateStyle TO 'European,ISO';
-NOTICE:  DateStyle is ISO with European conventions
 SHOW DateStyle;
+NOTICE:  DateStyle is ISO with European conventions
 SELECT '' AS sixty_three, d1 AS european_iso FROM DATETIME_TBL;
  sixty_three |       european_iso        
 -------------+---------------------------
@@ -989,8 +989,8 @@ SELECT '' AS eight, f1 AS european_iso FROM ABSTIME_TBL;
 (8 rows)
 
 SET DateStyle TO 'European,SQL';
-NOTICE:  DateStyle is SQL with European conventions
 SHOW DateStyle;
+NOTICE:  DateStyle is SQL with European conventions
 SELECT '' AS sixty_three, d1 AS european_sql FROM DATETIME_TBL;
  sixty_three |        european_sql        
 -------------+----------------------------
@@ -1072,14 +1072,14 @@ SELECT '' AS eight, f1 AS european_sql FROM ABSTIME_TBL;
 (8 rows)
 
 RESET DateStyle;
-NOTICE:  DateStyle is Postgres with US (NonEuropean) conventions
 SHOW DateStyle;
+NOTICE:  DateStyle is Postgres with US (NonEuropean) conventions
 --
 -- formats
 --
 SET DateStyle TO 'US,Postgres';
-NOTICE:  DateStyle is Postgres with US (NonEuropean) conventions
 SHOW DateStyle;
+NOTICE:  DateStyle is Postgres with US (NonEuropean) conventions
 SELECT '' AS sixty_two, d1 AS us_postgres FROM DATETIME_TBL;
  sixty_two |           us_postgres           
 -----------+---------------------------------
@@ -1242,8 +1242,8 @@ SELECT '' AS eight, f1 AS us_iso FROM ABSTIME_TBL;
 (8 rows)
 
 SET DateStyle TO 'US,SQL';
-NOTICE:  DateStyle is SQL with US (NonEuropean) conventions
 SHOW DateStyle;
+NOTICE:  DateStyle is SQL with US (NonEuropean) conventions
 SELECT '' AS sixty_two, d1 AS us_sql FROM DATETIME_TBL;
  sixty_two |           us_sql           
 -----------+----------------------------
@@ -1325,8 +1325,8 @@ SELECT '' AS eight, f1 AS us_sql FROM ABSTIME_TBL;
 (8 rows)
 
 SET DateStyle TO 'European,Postgres';
-NOTICE:  DateStyle is Postgres with European conventions
 SHOW DateStyle;
+NOTICE:  DateStyle is Postgres with European conventions
 INSERT INTO DATETIME_TBL VALUES('13/06/1957');
 SELECT count(*) as one FROM DATETIME_TBL WHERE d1 = 'Jun 13 1957';
  one 
@@ -1416,8 +1416,8 @@ SELECT '' AS eight, f1 AS european_postgres FROM ABSTIME_TBL;
 (8 rows)
 
 SET DateStyle TO 'European,ISO';
-NOTICE:  DateStyle is ISO with European conventions
 SHOW DateStyle;
+NOTICE:  DateStyle is ISO with European conventions
 SELECT '' AS sixty_three, d1 AS european_iso FROM DATETIME_TBL;
  sixty_three |       european_iso        
 -------------+---------------------------
@@ -1500,8 +1500,8 @@ SELECT '' AS eight, f1 AS european_iso FROM ABSTIME_TBL;
 (8 rows)
 
 SET DateStyle TO 'European,SQL';
-NOTICE:  DateStyle is SQL with European conventions
 SHOW DateStyle;
+NOTICE:  DateStyle is SQL with European conventions
 SELECT '' AS sixty_three, d1 AS european_sql FROM DATETIME_TBL;
  sixty_three |        european_sql        
 -------------+----------------------------
@@ -1584,5 +1584,5 @@ SELECT '' AS eight, f1 AS european_sql FROM ABSTIME_TBL;
 (8 rows)
 
 RESET DateStyle;
-NOTICE:  DateStyle is Postgres with US (NonEuropean) conventions
 SHOW DateStyle;
+NOTICE:  DateStyle is Postgres with US (NonEuropean) conventions
diff --git a/src/test/regress/expected/horology.out b/src/test/regress/expected/horology.out
index 4df888a51de..81587675ad1 100644
--- a/src/test/regress/expected/horology.out
+++ b/src/test/regress/expected/horology.out
@@ -572,8 +572,8 @@ DROP TABLE TEMP_DATETIME;
 -- formats
 --
 SET DateStyle TO 'US,Postgres';
-NOTICE:  DateStyle is Postgres with US (NonEuropean) conventions
 SHOW DateStyle;
+NOTICE:  DateStyle is Postgres with US (NonEuropean) conventions
 SELECT '' AS sixty_two, d1 AS us_postgres FROM DATETIME_TBL;
  sixty_two |           us_postgres           
 -----------+---------------------------------
@@ -734,8 +734,8 @@ SELECT '' AS eight, f1 AS us_iso FROM ABSTIME_TBL;
 (8 rows)
 
 SET DateStyle TO 'US,SQL';
-NOTICE:  DateStyle is SQL with US (NonEuropean) conventions
 SHOW DateStyle;
+NOTICE:  DateStyle is SQL with US (NonEuropean) conventions
 SELECT '' AS sixty_two, d1 AS us_sql FROM DATETIME_TBL;
  sixty_two |           us_sql           
 -----------+----------------------------
@@ -816,8 +816,8 @@ SELECT '' AS eight, f1 AS us_sql FROM ABSTIME_TBL;
 (8 rows)
 
 SET DateStyle TO 'European,Postgres';
-NOTICE:  DateStyle is Postgres with European conventions
 SHOW DateStyle;
+NOTICE:  DateStyle is Postgres with European conventions
 INSERT INTO DATETIME_TBL VALUES('13/06/1957');
 SELECT count(*) as one FROM DATETIME_TBL WHERE d1 = 'Jun 13 1957';
  one 
@@ -906,8 +906,8 @@ SELECT '' AS eight, f1 AS european_postgres FROM ABSTIME_TBL;
 (8 rows)
 
 SET DateStyle TO 'European,ISO';
-NOTICE:  DateStyle is ISO with European conventions
 SHOW DateStyle;
+NOTICE:  DateStyle is ISO with European conventions
 SELECT '' AS sixty_three, d1 AS european_iso FROM DATETIME_TBL;
  sixty_three |       european_iso        
 -------------+---------------------------
@@ -989,8 +989,8 @@ SELECT '' AS eight, f1 AS european_iso FROM ABSTIME_TBL;
 (8 rows)
 
 SET DateStyle TO 'European,SQL';
-NOTICE:  DateStyle is SQL with European conventions
 SHOW DateStyle;
+NOTICE:  DateStyle is SQL with European conventions
 SELECT '' AS sixty_three, d1 AS european_sql FROM DATETIME_TBL;
  sixty_three |        european_sql        
 -------------+----------------------------
@@ -1072,14 +1072,14 @@ SELECT '' AS eight, f1 AS european_sql FROM ABSTIME_TBL;
 (8 rows)
 
 RESET DateStyle;
-NOTICE:  DateStyle is Postgres with US (NonEuropean) conventions
 SHOW DateStyle;
+NOTICE:  DateStyle is Postgres with US (NonEuropean) conventions
 --
 -- formats
 --
 SET DateStyle TO 'US,Postgres';
-NOTICE:  DateStyle is Postgres with US (NonEuropean) conventions
 SHOW DateStyle;
+NOTICE:  DateStyle is Postgres with US (NonEuropean) conventions
 SELECT '' AS sixty_two, d1 AS us_postgres FROM DATETIME_TBL;
  sixty_two |           us_postgres           
 -----------+---------------------------------
@@ -1242,8 +1242,8 @@ SELECT '' AS eight, f1 AS us_iso FROM ABSTIME_TBL;
 (8 rows)
 
 SET DateStyle TO 'US,SQL';
-NOTICE:  DateStyle is SQL with US (NonEuropean) conventions
 SHOW DateStyle;
+NOTICE:  DateStyle is SQL with US (NonEuropean) conventions
 SELECT '' AS sixty_two, d1 AS us_sql FROM DATETIME_TBL;
  sixty_two |           us_sql           
 -----------+----------------------------
@@ -1325,8 +1325,8 @@ SELECT '' AS eight, f1 AS us_sql FROM ABSTIME_TBL;
 (8 rows)
 
 SET DateStyle TO 'European,Postgres';
-NOTICE:  DateStyle is Postgres with European conventions
 SHOW DateStyle;
+NOTICE:  DateStyle is Postgres with European conventions
 INSERT INTO DATETIME_TBL VALUES('13/06/1957');
 SELECT count(*) as one FROM DATETIME_TBL WHERE d1 = 'Jun 13 1957';
  one 
@@ -1416,8 +1416,8 @@ SELECT '' AS eight, f1 AS european_postgres FROM ABSTIME_TBL;
 (8 rows)
 
 SET DateStyle TO 'European,ISO';
-NOTICE:  DateStyle is ISO with European conventions
 SHOW DateStyle;
+NOTICE:  DateStyle is ISO with European conventions
 SELECT '' AS sixty_three, d1 AS european_iso FROM DATETIME_TBL;
  sixty_three |       european_iso        
 -------------+---------------------------
@@ -1500,8 +1500,8 @@ SELECT '' AS eight, f1 AS european_iso FROM ABSTIME_TBL;
 (8 rows)
 
 SET DateStyle TO 'European,SQL';
-NOTICE:  DateStyle is SQL with European conventions
 SHOW DateStyle;
+NOTICE:  DateStyle is SQL with European conventions
 SELECT '' AS sixty_three, d1 AS european_sql FROM DATETIME_TBL;
  sixty_three |        european_sql        
 -------------+----------------------------
@@ -1584,5 +1584,5 @@ SELECT '' AS eight, f1 AS european_sql FROM ABSTIME_TBL;
 (8 rows)
 
 RESET DateStyle;
-NOTICE:  DateStyle is Postgres with US (NonEuropean) conventions
 SHOW DateStyle;
+NOTICE:  DateStyle is Postgres with US (NonEuropean) conventions
diff --git a/src/test/regress/expected/join.out b/src/test/regress/expected/join.out
index 1245847a96e..2a3fb1b68b8 100644
--- a/src/test/regress/expected/join.out
+++ b/src/test/regress/expected/join.out
@@ -127,20 +127,20 @@ ERROR:  JOIN expressions are not yet implemented
 -- Outer joins
 --
 SELECT '' AS "xxx", *
-NOTICE:  OUTER JOIN not yet implemented
   FROM JOIN1_TBL OUTER JOIN JOIN2_TBL USING (i);
+NOTICE:  OUTER JOIN not yet implemented
 ERROR:  JOIN expressions are not yet implemented
 SELECT '' AS "xxx", *
-NOTICE:  LEFT OUTER JOIN not yet implemented
   FROM JOIN1_TBL LEFT OUTER JOIN JOIN2_TBL USING (i);
+NOTICE:  LEFT OUTER JOIN not yet implemented
 ERROR:  JOIN expressions are not yet implemented
 SELECT '' AS "xxx", *
-NOTICE:  RIGHT OUTER JOIN not yet implemented
   FROM JOIN1_TBL RIGHT OUTER JOIN JOIN2_TBL USING (i);
+NOTICE:  RIGHT OUTER JOIN not yet implemented
 ERROR:  JOIN expressions are not yet implemented
 SELECT '' AS "xxx", *
-NOTICE:  FULL OUTER JOIN not yet implemented
   FROM JOIN1_TBL FULL OUTER JOIN JOIN2_TBL USING (i);
+NOTICE:  FULL OUTER JOIN not yet implemented
 ERROR:  JOIN expressions are not yet implemented
 --
 -- More complicated constructs
diff --git a/src/test/regress/expected/triggers.out b/src/test/regress/expected/triggers.out
index 4d84795fe28..b5a62dace1b 100644
--- a/src/test/regress/expected/triggers.out
+++ b/src/test/regress/expected/triggers.out
@@ -74,18 +74,18 @@ ERROR:  check_fkeys_pkey_exist: tuple references non-existing key in pkeys
 -- no key in fkeys2
 insert into fkeys values (60, '6', 4);
 ERROR:  check_fkeys_pkey2_exist: tuple references non-existing key in fkeys2
-NOTICE:  check_pkeys_fkey_cascade: 1 tuple(s) of fkeys are deleted
 delete from pkeys where pkey1 = 30 and pkey2 = '3';
-ERROR:  check_fkeys2_fkey_restrict: tuple referenced in fkeys
 NOTICE:  check_pkeys_fkey_cascade: 1 tuple(s) of fkeys are deleted
-NOTICE:  check_pkeys_fkey_cascade: 1 tuple(s) of fkeys2 are deleted
+ERROR:  check_fkeys2_fkey_restrict: tuple referenced in fkeys
 delete from pkeys where pkey1 = 40 and pkey2 = '4';
 NOTICE:  check_pkeys_fkey_cascade: 1 tuple(s) of fkeys are deleted
+NOTICE:  check_pkeys_fkey_cascade: 1 tuple(s) of fkeys2 are deleted
 update pkeys set pkey1 = 7, pkey2 = '70' where pkey1 = 50 and pkey2 = '5';
+NOTICE:  check_pkeys_fkey_cascade: 1 tuple(s) of fkeys are deleted
 ERROR:  check_fkeys2_fkey_restrict: tuple referenced in fkeys
+update pkeys set pkey1 = 7, pkey2 = '70' where pkey1 = 10 and pkey2 = '1';
 NOTICE:  check_pkeys_fkey_cascade: 1 tuple(s) of fkeys are deleted
 NOTICE:  check_pkeys_fkey_cascade: 1 tuple(s) of fkeys2 are deleted
-update pkeys set pkey1 = 7, pkey2 = '70' where pkey1 = 10 and pkey2 = '1';
 DROP TABLE pkeys;
 DROP TABLE fkeys;
 DROP TABLE fkeys2;
diff --git a/src/test/regress/output/constraints.source b/src/test/regress/output/constraints.source
index 0b3a87588eb..ae389252202 100644
--- a/src/test/regress/output/constraints.source
+++ b/src/test/regress/output/constraints.source
@@ -180,8 +180,8 @@ CREATE TABLE tmp (xd INT, yd TEXT, zd INT);
 INSERT INTO tmp VALUES (null, 'Y', null);
 INSERT INTO tmp VALUES (5, '!check failed', null);
 INSERT INTO tmp VALUES (null, 'try again', null);
-NOTICE:  insert_seq.nextval: sequence was re-created
 INSERT INTO INSERT_TBL(y) select yd from tmp;
+NOTICE:  insert_seq.nextval: sequence was re-created
 SELECT '' AS three, * FROM INSERT_TBL;
  three | x |       y       | z  
 -------+---+---------------+----
@@ -250,8 +250,8 @@ SELECT * FROM COPY_TBL;
 --
 -- Primary keys
 --
-NOTICE:  CREATE TABLE/PRIMARY KEY will create implicit index 'primary_tbl_pkey' for table 'primary_tbl'
 CREATE TABLE PRIMARY_TBL (i int PRIMARY KEY, t text);
+NOTICE:  CREATE TABLE/PRIMARY KEY will create implicit index 'primary_tbl_pkey' for table 'primary_tbl'
 INSERT INTO PRIMARY_TBL VALUES (1, 'one');
 INSERT INTO PRIMARY_TBL VALUES (2, 'two');
 INSERT INTO PRIMARY_TBL VALUES (1, 'three');
@@ -271,8 +271,8 @@ SELECT '' AS four, * FROM PRIMARY_TBL;
 
 DROP TABLE PRIMARY_TBL;
 CREATE TABLE PRIMARY_TBL (i int, t text,
-NOTICE:  CREATE TABLE/PRIMARY KEY will create implicit index 'primary_tbl_pkey' for table 'primary_tbl'
 	PRIMARY KEY(i,t));
+NOTICE:  CREATE TABLE/PRIMARY KEY will create implicit index 'primary_tbl_pkey' for table 'primary_tbl'
 INSERT INTO PRIMARY_TBL VALUES (1, 'one');
 INSERT INTO PRIMARY_TBL VALUES (2, 'two');
 INSERT INTO PRIMARY_TBL VALUES (1, 'three');
@@ -294,8 +294,8 @@ DROP TABLE PRIMARY_TBL;
 --
 -- Unique keys
 --
-NOTICE:  CREATE TABLE/UNIQUE will create implicit index 'unique_tbl_i_key' for table 'unique_tbl'
 CREATE TABLE UNIQUE_TBL (i int UNIQUE, t text);
+NOTICE:  CREATE TABLE/UNIQUE will create implicit index 'unique_tbl_i_key' for table 'unique_tbl'
 INSERT INTO UNIQUE_TBL VALUES (1, 'one');
 INSERT INTO UNIQUE_TBL VALUES (2, 'two');
 INSERT INTO UNIQUE_TBL VALUES (1, 'three');
@@ -317,8 +317,8 @@ SELECT '' AS five, * FROM UNIQUE_TBL;
 
 DROP TABLE UNIQUE_TBL;
 CREATE TABLE UNIQUE_TBL (i int, t text,
-NOTICE:  CREATE TABLE/UNIQUE will create implicit index 'unique_tbl_i_key' for table 'unique_tbl'
 	UNIQUE(i,t));
+NOTICE:  CREATE TABLE/UNIQUE will create implicit index 'unique_tbl_i_key' for table 'unique_tbl'
 INSERT INTO UNIQUE_TBL VALUES (1, 'one');
 INSERT INTO UNIQUE_TBL VALUES (2, 'two');
 INSERT INTO UNIQUE_TBL VALUES (1, 'three');
diff --git a/src/test/regress/output/create_function_1.source b/src/test/regress/output/create_function_1.source
index 4ccc57ff5bd..64fad7a8785 100644
--- a/src/test/regress/output/create_function_1.source
+++ b/src/test/regress/output/create_function_1.source
@@ -4,8 +4,8 @@
 CREATE FUNCTION widget_in(opaque)
    RETURNS widget
    AS '_OBJWD_/regress_DLSUFFIX_'
-NOTICE:  ProcedureCreate: type 'widget' is not yet defined
    LANGUAGE 'c';
+NOTICE:  ProcedureCreate: type 'widget' is not yet defined
 CREATE FUNCTION widget_out(opaque)
    RETURNS opaque
    AS '_OBJWD_/regress_DLSUFFIX_'