Update regression tests for ONLY and other recent changes.
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 10 Jun 2000 05:19:26 +0000 (05:19 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 10 Jun 2000 05:19:26 +0000 (05:19 +0000)
src/test/regress/expected/aggregates.out
src/test/regress/expected/create_view.out
src/test/regress/expected/rules.out
src/test/regress/input/misc.source
src/test/regress/output/misc.source
src/test/regress/sql/aggregates.sql
src/test/regress/sql/create_view.sql

index c0829b898b3fb83006162434ba319d79d1dc9889..92936e3414a6df44e65eb7dfd9668d3c871ffb5f 100644 (file)
@@ -19,7 +19,7 @@ SELECT avg(b) AS avg_107_943 FROM aggtest;
      107.943
 (1 row)
 
-SELECT avg(gpa) AS avg_3_4 FROM student;
+SELECT avg(gpa) AS avg_3_4 FROM ONLY student;
  avg_3_4 
 ---------
      3.4
@@ -43,7 +43,7 @@ SELECT sum(b) AS avg_431_773 FROM aggtest;
      431.773
 (1 row)
 
-SELECT sum(gpa) AS avg_6_8 FROM student;
+SELECT sum(gpa) AS avg_6_8 FROM ONLY student;
  avg_6_8 
 ---------
      6.8
index 79a03e9aa7f490e3ed4aee91a82b2507c8fc655b..e398440bce832b6706dce6c5191854fbf9720c03 100644 (file)
@@ -5,7 +5,7 @@
 --
 CREATE VIEW street AS
    SELECT r.name, r.thepath, c.cname AS cname 
-   FROM road r, real_city c
+   FROM ONLY road r, real_city c
    WHERE c.outline ## r.thepath;
 CREATE VIEW iexit AS
    SELECT ih.name, ih.thepath, 
index edb066f116e217978f7e0e1dc0089a0638bb4263..8296a1b938ecd0d091e47a1d3dd3b89ab9c8d5e1 100644 (file)
@@ -1168,7 +1168,7 @@ SELECT viewname, definition FROM pg_views ORDER BY viewname;
  pg_indexes         | SELECT c.relname AS tablename, i.relname AS indexname, pg_get_indexdef(x.indexrelid) AS indexdef FROM pg_index x, pg_class c, pg_class i WHERE ((c.oid = x.indrelid) AND (i.oid = x.indexrelid));
  pg_rules           | SELECT c.relname AS tablename, r.rulename, pg_get_ruledef(r.rulename) AS definition FROM pg_rewrite r, pg_class c WHERE ((r.rulename !~ '^_RET'::text) AND (c.oid = r.ev_class));
  pg_tables          | SELECT c.relname AS tablename, pg_get_userbyid(c.relowner) AS tableowner, c.relhasindex AS hasindexes, c.relhasrules AS hasrules, (c.reltriggers > 0) AS hastriggers FROM pg_class c WHERE (((c.relkind = 'r'::"char") OR (c.relkind = 's'::"char")) AND (NOT (EXISTS (SELECT pg_rewrite.rulename FROM pg_rewrite WHERE ((pg_rewrite.ev_class = c.oid) AND (pg_rewrite.ev_type = '1'::"char"))))));
- pg_user            | SELECT pg_shadow.usename, pg_shadow.usesysid, pg_shadow.usecreatedb, pg_shadow.usetrace, pg_shadow.usesuper, pg_shadow.usecatupd, '********'::text AS passwd, pg_shadow.valuntil FROM pg_shadow;
+ pg_user            | SELECT pg_shadow.usename, pg_shadow.usesysid, pg_shadow.usecreatedb, pg_shadow.usecreatetable, pg_shadow.uselocktable, pg_shadow.usetrace, pg_shadow.usesuper, pg_shadow.usecatupd, '********'::text AS passwd, pg_shadow.valuntil FROM pg_shadow;
  pg_views           | SELECT c.relname AS viewname, pg_get_userbyid(c.relowner) AS viewowner, pg_get_viewdef(c.relname) AS definition FROM pg_class c WHERE (c.relhasrules AND (EXISTS (SELECT r.rulename FROM pg_rewrite r WHERE ((r.ev_class = c.oid) AND (r.ev_type = '1'::"char")))));
  rtest_v1           | SELECT rtest_t1.a, rtest_t1.b FROM rtest_t1;
  rtest_vcomp        | SELECT x.part, (x.size * y.factor) AS size_in_cm FROM rtest_comp x, rtest_unitfact y WHERE (x.unit = y.unit);
@@ -1182,7 +1182,7 @@ SELECT viewname, definition FROM pg_views ORDER BY viewname;
  shoelace           | SELECT s.sl_name, s.sl_avail, s.sl_color, s.sl_len, s.sl_unit, (s.sl_len * u.un_fact) AS sl_len_cm FROM shoelace_data s, unit u WHERE (s.sl_unit = u.un_name);
  shoelace_candelete | SELECT shoelace_obsolete.sl_name, shoelace_obsolete.sl_avail, shoelace_obsolete.sl_color, shoelace_obsolete.sl_len, shoelace_obsolete.sl_unit, shoelace_obsolete.sl_len_cm FROM shoelace_obsolete WHERE (shoelace_obsolete.sl_avail = 0);
  shoelace_obsolete  | SELECT shoelace.sl_name, shoelace.sl_avail, shoelace.sl_color, shoelace.sl_len, shoelace.sl_unit, shoelace.sl_len_cm FROM shoelace WHERE (NOT (EXISTS (SELECT shoe.shoename FROM shoe WHERE (shoe.slcolor = shoelace.sl_color))));
- street             | SELECT r.name, r.thepath, c.cname FROM road r, real_city c WHERE (c.outline ## r.thepath);
+ street             | SELECT r.name, r.thepath, c.cname FROM ONLY road r, real_city c WHERE (c.outline ## r.thepath);
  toyemp             | SELECT emp.name, emp.age, emp."location", (12 * emp.salary) AS annualsal FROM emp;
 (20 rows)
 
index 7b879bc7ef7b9e28948f709b85c9477108739028..e125088660953cb7f785167e88242555399613dd 100644 (file)
@@ -124,10 +124,13 @@ SELECT class, aa
    FROM a_star* x
    WHERE aa ISNULL;
 
+-- As of Postgres 7.1, ALTER implicitly recurses,
+-- so this should be same as ALTER a_star*
+
 ALTER TABLE a_star RENAME COLUMN aa TO foo;
 
 SELECT class, foo
-   FROM a_star x
+   FROM a_star* x
    WHERE x.foo >= 2;
 
 ALTER TABLE a_star RENAME COLUMN foo TO aa;
@@ -167,7 +170,7 @@ SELECT class, aa, a FROM a_star*;
 -- joe and sally play basketball, and
 -- everyone else does nothing.
 --
-SELECT p.name, p.hobbies.name FROM person p;
+SELECT p.name, p.hobbies.name FROM ONLY person p;
 
 --
 -- as above, but jeff also does post_hacking.
@@ -187,7 +190,7 @@ SELECT hobbies_r.name, hobbies_r.equipment.name FROM hobbies_r;
 -- joe and sally need hightops, and
 -- everyone else is fine.
 --
-SELECT p.name, p.hobbies.name, p.hobbies.equipment.name FROM person p;
+SELECT p.name, p.hobbies.name, p.hobbies.equipment.name FROM ONLY person p;
 
 --
 -- as above, but jeff needs advil and peet's coffee as well.
@@ -198,11 +201,11 @@ SELECT p.name, p.hobbies.name, p.hobbies.equipment.name FROM person* p;
 -- just like the last two, but make sure that the target list fixup and
 -- unflattening is being done correctly.
 --
-SELECT p.hobbies.equipment.name, p.name, p.hobbies.name FROM person p;
+SELECT p.hobbies.equipment.name, p.name, p.hobbies.name FROM ONLY person p;
 
 SELECT p.hobbies.equipment.name, p.name, p.hobbies.name FROM person* p;
 
-SELECT p.hobbies.equipment.name, p.hobbies.name, p.name FROM person p;
+SELECT p.hobbies.equipment.name, p.hobbies.name, p.name FROM ONLY person p;
 
 SELECT p.hobbies.equipment.name, p.hobbies.name, p.name FROM person* p;
 
index 034e42c524301fa8438180a39708249ae34449e0..dba952f86375e00ee18992edd013bf305f0c06ba 100644 (file)
@@ -271,14 +271,40 @@ SELECT class, aa
  f     |   
 (24 rows)
 
+-- As of Postgres 7.1, ALTER implicitly recurses,
+-- so this should be same as ALTER a_star*
 ALTER TABLE a_star RENAME COLUMN aa TO foo;
 SELECT class, foo
-   FROM a_star x
+   FROM a_star* x
    WHERE x.foo >= 2;
  class | foo 
 -------+-----
  a     |   2
-(1 row)
+ b     |   3
+ b     |   4
+ c     |   5
+ c     |   6
+ d     |   7
+ d     |   8
+ d     |   9
+ d     |  10
+ d     |  11
+ d     |  12
+ d     |  13
+ d     |  14
+ e     |  15
+ e     |  16
+ e     |  17
+ e     |  18
+ f     |  19
+ f     |  20
+ f     |  21
+ f     |  22
+ f     |  24
+ f     |  25
+ f     |  26
+ f     |  27
+(25 rows)
 
 ALTER TABLE a_star RENAME COLUMN foo TO aa;
 SELECT * 
@@ -416,7 +442,7 @@ SELECT class, aa, a FROM a_star*;
 -- joe and sally play basketball, and
 -- everyone else does nothing.
 --
-SELECT p.name, p.hobbies.name FROM person p;
+SELECT p.name, p.hobbies.name FROM ONLY person p;
  name  |    name     
 -------+-------------
  mike  | posthacking
@@ -466,7 +492,7 @@ SELECT hobbies_r.name, hobbies_r.equipment.name FROM hobbies_r;
 -- joe and sally need hightops, and
 -- everyone else is fine.
 --
-SELECT p.name, p.hobbies.name, p.hobbies.equipment.name FROM person p;
+SELECT p.name, p.hobbies.name, p.hobbies.equipment.name FROM ONLY person p;
  name  |    name     |     name      
 -------+-------------+---------------
  mike  | posthacking | advil
@@ -493,7 +519,7 @@ SELECT p.name, p.hobbies.name, p.hobbies.equipment.name FROM person* p;
 -- just like the last two, but make sure that the target list fixup and
 -- unflattening is being done correctly.
 --
-SELECT p.hobbies.equipment.name, p.name, p.hobbies.name FROM person p;
+SELECT p.hobbies.equipment.name, p.name, p.hobbies.name FROM ONLY person p;
      name      | name  |    name     
 ---------------+-------+-------------
  advil         | mike  | posthacking
@@ -513,7 +539,7 @@ SELECT p.hobbies.equipment.name, p.name, p.hobbies.name FROM person* p;
  peet's coffee | jeff  | posthacking
 (6 rows)
 
-SELECT p.hobbies.equipment.name, p.hobbies.name, p.name FROM person p;
+SELECT p.hobbies.equipment.name, p.hobbies.name, p.name FROM ONLY person p;
      name      |    name     | name  
 ---------------+-------------+-------
  advil         | posthacking | mike
@@ -537,10 +563,12 @@ SELECT user_relns() AS user_relns
    ORDER BY user_relns;
      user_relns      
 ---------------------
+ a
  a_star
  abstime_tbl
  aggtest
  arrtest
+ b
  b_star
  box_tbl
  bprime
@@ -548,6 +576,7 @@ SELECT user_relns() AS user_relns
  bt_i4_heap
  bt_name_heap
  bt_txt_heap
+ c
  c_star
  char_tbl
  check2_tbl
@@ -556,6 +585,7 @@ SELECT user_relns() AS user_relns
  circle_tbl
  city
  copy_tbl
+ d
  d_star
  default_seq
  default_tbl
@@ -623,7 +653,7 @@ SELECT user_relns() AS user_relns
  toyemp
  varchar_tbl
  xacttest
-(86 rows)
+(90 rows)
 
 --SELECT name(equipment(hobby_construct(text 'skywalking', text 'mer'))) AS equip_name;
 --
index b5aa3c0ed6375d16d3033af13f0314622b4fa0bc..45b8dd990fcef7df99bb9a635756f58f76b42b04 100644 (file)
@@ -8,7 +8,7 @@ SELECT avg(a) AS avg_32 FROM aggtest WHERE a < 100;
 
 SELECT avg(b) AS avg_107_943 FROM aggtest;
 
-SELECT avg(gpa) AS avg_3_4 FROM student;
+SELECT avg(gpa) AS avg_3_4 FROM ONLY student;
 
 
 SELECT sum(four) AS sum_1500 FROM onek;
@@ -17,7 +17,7 @@ SELECT sum(a) AS sum_198 FROM aggtest;
 
 SELECT sum(b) AS avg_431_773 FROM aggtest;
 
-SELECT sum(gpa) AS avg_6_8 FROM student;
+SELECT sum(gpa) AS avg_6_8 FROM ONLY student;
 
 
 SELECT max(four) AS max_3 FROM onek;
index 2d7ab12e580651c7af4d9a46abc14c78d05d9790..858c8ce960d17f26184b5cd628f83e97384168e4 100644 (file)
@@ -6,7 +6,7 @@
 
 CREATE VIEW street AS
    SELECT r.name, r.thepath, c.cname AS cname 
-   FROM road r, real_city c
+   FROM ONLY road r, real_city c
    WHERE c.outline ## r.thepath;
 
 CREATE VIEW iexit AS