diff options
author | Tomas Vondra | 2017-05-05 18:41:58 +0000 |
---|---|---|
committer | Tomas Vondra | 2017-05-05 18:41:58 +0000 |
commit | 6a873fb5982777c22e165ac8a3838134d0ad263e (patch) | |
tree | 3b3c567558ed9912f9d5fe7a22159c52d2e25cab | |
parent | 91a3d2d25ae7f0f171b519d26a957ac2e01e897f (diff) |
Update expected output issues in misc test suite
The expected output included output for queries that are however
commented-out in the input script. Fix that by removing the query
results and replace it with just the commands.
-rw-r--r-- | src/test/regress/output/misc.source | 452 |
1 files changed, 81 insertions, 371 deletions
diff --git a/src/test/regress/output/misc.source b/src/test/regress/output/misc.source index fc092bbf98..7366fd88b3 100644 --- a/src/test/regress/output/misc.source +++ b/src/test/regress/output/misc.source @@ -456,377 +456,87 @@ SELECT class, aa, a FROM a_star* ORDER BY 1,2; -- -- versions -- --- --- postquel functions --- --- --- mike does post_hacking, --- joe and sally play basketball, and --- everyone else does nothing. --- -SELECT p.name, name(p.hobbies) FROM ONLY person p; - name | name --------+------------- - mike | posthacking - joe | basketball - sally | basketball -(3 rows) - --- --- as above, but jeff also does post_hacking. --- -SELECT p.name, name(p.hobbies) FROM person* p; - name | name --------+------------- - mike | posthacking - joe | basketball - sally | basketball - jeff | posthacking -(4 rows) - --- --- the next two queries demonstrate how functions generate bogus duplicates. --- this is a "feature" .. --- -SELECT DISTINCT hobbies_r.name, name(hobbies_r.equipment) FROM hobbies_r - ORDER BY 1,2; - name | name --------------+--------------- - basketball | hightops - posthacking | advil - posthacking | peet's coffee - skywalking | guts -(4 rows) - -SELECT hobbies_r.name, (hobbies_r.equipment).name FROM hobbies_r; - name | name --------------+--------------- - posthacking | advil - posthacking | peet's coffee - posthacking | advil - posthacking | peet's coffee - basketball | hightops - basketball | hightops - skywalking | guts -(7 rows) - --- --- mike needs advil and peet's coffee, --- joe and sally need hightops, and --- everyone else is fine. --- -SELECT p.name, name(p.hobbies), name(equipment(p.hobbies)) FROM ONLY person p; - name | name | name --------+-------------+--------------- - mike | posthacking | advil - mike | posthacking | peet's coffee - joe | basketball | hightops - sally | basketball | hightops -(4 rows) - --- --- as above, but jeff needs advil and peet's coffee as well. --- -SELECT p.name, name(p.hobbies), name(equipment(p.hobbies)) FROM person* p; - name | name | name --------+-------------+--------------- - mike | posthacking | advil - mike | posthacking | peet's coffee - joe | basketball | hightops - sally | basketball | hightops - jeff | posthacking | advil - jeff | posthacking | peet's coffee -(6 rows) - --- --- just like the last two, but make sure that the target list fixup and --- unflattening is being done correctly. --- -SELECT name(equipment(p.hobbies)), p.name, name(p.hobbies) FROM ONLY person p; - name | name | name ----------------+-------+------------- - advil | mike | posthacking - peet's coffee | mike | posthacking - hightops | joe | basketball - hightops | sally | basketball -(4 rows) - -SELECT (p.hobbies).equipment.name, p.name, name(p.hobbies) FROM person* p; - name | name | name ----------------+-------+------------- - advil | mike | posthacking - peet's coffee | mike | posthacking - hightops | joe | basketball - hightops | sally | basketball - advil | jeff | posthacking - peet's coffee | jeff | posthacking -(6 rows) - -SELECT (p.hobbies).equipment.name, name(p.hobbies), p.name FROM ONLY person p; - name | name | name ----------------+-------------+------- - advil | posthacking | mike - peet's coffee | posthacking | mike - hightops | basketball | joe - hightops | basketball | sally -(4 rows) - -SELECT name(equipment(p.hobbies)), name(p.hobbies), p.name FROM person* p; - name | name | name ----------------+-------------+------- - advil | posthacking | mike - peet's coffee | posthacking | mike - hightops | basketball | joe - hightops | basketball | sally - advil | posthacking | jeff - peet's coffee | posthacking | jeff -(6 rows) - -SELECT user_relns() AS user_relns - ORDER BY user_relns; - user_relns ---------------------- - a - a_star - abstime_tbl - aggtest - aggtype - array_index_op_test - array_op_test - arrtest - b - b_star - box_tbl - bprime - brinopers - brintest - bt_f8_heap - bt_i4_heap - bt_name_heap - bt_txt_heap - btree_tall_tbl - c - c_star - char_tbl - check2_tbl - check_seq - check_tbl - circle_tbl - city - copy_tbl - d - d_star - date_tbl - default_seq - default_tbl - defaultexpr_tbl - dept - dupindexcols - e_star - emp - equipment_r - f_star - fast_emp4000 - float4_tbl - float8_tbl - func_index_heap - gin_test_tbl - gist_point_tbl - hash_f8_heap - hash_i4_heap - hash_name_heap - hash_txt_heap - hobbies_r - iexit - ihighway - inet_tbl - inhf - inhx - insert_seq - insert_tbl - int2_tbl - int4_tbl - int8_tbl - interval_tbl - iportaltest - kd_point_tbl - line_tbl - log_table - lseg_tbl - main_table - money_data - mvtest_bb - mvtest_t - mvtest_tm - mvtest_tmm - mvtest_tv - mvtest_tvm - mvtest_tvmm - mvtest_tvv - mvtest_tvvm - mvtest_tvvmv - num_data - num_exp_add - num_exp_div - num_exp_ln - num_exp_log10 - num_exp_mul - num_exp_power_10_ln - num_exp_sqrt - num_exp_sub - num_input_test - num_result - onek - onek2 - path_tbl - person - point_tbl - polygon_tbl - quad_point_tbl - radix_text_tbl - ramp - random_tbl - real_city - reltime_tbl - rls_tbl - rls_tbl_force - road - shighway - slow_emp4000 - spgist_point_tbl - spgist_text_tbl - street - stud_emp - student - subselect_tbl - tenk1 - tenk2 - test_range_excl - test_range_gist - test_range_spgist - test_tablesample - test_tablesample_v1 - test_tablesample_v2 - test_tsvector - testjsonb - text_tbl - time_tbl - timestamp_tbl - timestamptz_tbl - timetz_tbl - tinterval_tbl - toyemp - varchar_tbl - xacttest -(132 rows) - -SELECT name(equipment(hobby_construct(text 'skywalking', text 'mer'))); - name ------- - guts -(1 row) - -SELECT name(equipment(hobby_construct_named(text 'skywalking', text 'mer'))); - name ------- - guts -(1 row) - -SELECT name(equipment_named(hobby_construct_named(text 'skywalking', text 'mer'))); - name ------- - guts -(1 row) - -SELECT name(equipment_named_ambiguous_1a(hobby_construct_named(text 'skywalking', text 'mer'))); - name ------- - guts -(1 row) - -SELECT name(equipment_named_ambiguous_1b(hobby_construct_named(text 'skywalking', text 'mer'))); - name ------- - guts -(1 row) - -SELECT name(equipment_named_ambiguous_1c(hobby_construct_named(text 'skywalking', text 'mer'))); - name ------- - guts -(1 row) - -SELECT name(equipment_named_ambiguous_2a(text 'skywalking')); - name ------- - guts -(1 row) - -SELECT name(equipment_named_ambiguous_2b(text 'skywalking')); - name ---------------- - advil - peet's coffee - hightops - guts -(4 rows) - -SELECT hobbies_by_name('basketball'); - hobbies_by_name ------------------ - joe -(1 row) - -SELECT name, overpaid(emp.*) FROM emp; - name | overpaid ---------+---------- - sharon | t - sam | t - bill | t - jeff | f - cim | f - linda | f -(6 rows) - --- --- Try a few cases with SQL-spec row constructor expressions --- -SELECT * FROM equipment(ROW('skywalking', 'mer')); - name | hobby -------+------------ - guts | skywalking -(1 row) - -SELECT name(equipment(ROW('skywalking', 'mer'))); - name ------- - guts -(1 row) - -SELECT *, name(equipment(h.*)) FROM hobbies_r h; - name | person | name --------------+--------+--------------- - posthacking | mike | advil - posthacking | mike | peet's coffee - posthacking | jeff | advil - posthacking | jeff | peet's coffee - basketball | joe | hightops - basketball | sally | hightops - skywalking | | guts -(7 rows) - -SELECT *, (equipment(CAST((h.*) AS hobbies_r))).name FROM hobbies_r h; - name | person | name --------------+--------+--------------- - posthacking | mike | advil - posthacking | mike | peet's coffee - posthacking | jeff | advil - posthacking | jeff | peet's coffee - basketball | joe | hightops - basketball | sally | hightops - skywalking | | guts -(7 rows) - +-- -- +-- -- postquel functions +-- -- +-- -- +-- -- mike does post_hacking, +-- -- joe and sally play basketball, and +-- -- everyone else does nothing. +-- -- +-- SELECT p.name, name(p.hobbies) FROM ONLY person p ORDER BY 1,2; +-- +-- -- +-- -- as above, but jeff also does post_hacking. +-- -- +-- SELECT p.name, name(p.hobbies) FROM person* p ORDER BY 1,2; +-- +-- -- +-- -- the next two queries demonstrate how functions generate bogus duplicates. +-- -- this is a "feature" .. +-- -- +-- SELECT DISTINCT hobbies_r.name, name(hobbies_r.equipment) FROM hobbies_r +-- ORDER BY 1,2; +-- +-- SELECT hobbies_r.name, (hobbies_r.equipment).name FROM hobbies_r ORDER BY 1,2; +-- +-- -- +-- -- mike needs advil and peet's coffee, +-- -- joe and sally need hightops, and +-- -- everyone else is fine. +-- -- +-- SELECT p.name, name(p.hobbies), name(equipment(p.hobbies)) FROM ONLY person p ORDER BY 1,2,3; +-- +-- -- +-- -- as above, but jeff needs advil and peet's coffee as well. +-- -- +-- SELECT p.name, name(p.hobbies), name(equipment(p.hobbies)) FROM person* p ORDER BY 1,2,3; +-- +-- -- +-- -- just like the last two, but make sure that the target list fixup and +-- -- unflattening is being done correctly. +-- -- +-- SELECT name(equipment(p.hobbies)), p.name, name(p.hobbies) FROM ONLY person p ORDER BY 1,2,3; +-- +-- SELECT (p.hobbies).equipment.name, p.name, name(p.hobbies) FROM person* p ORDER BY 1,2,3; +-- +-- SELECT (p.hobbies).equipment.name, name(p.hobbies), p.name FROM ONLY person p ORDER BY 1,2,3; +-- +-- SELECT name(equipment(p.hobbies)), name(p.hobbies), p.name FROM person* p ORDER BY 1,2,3; +-- +-- SELECT user_relns() AS user_relns +-- ORDER BY user_relns; +-- +-- SELECT name(equipment(hobby_construct(text 'skywalking', text 'mer'))); +-- +-- SELECT name(equipment(hobby_construct_named(text 'skywalking', text 'mer'))); +-- +-- SELECT name(equipment_named(hobby_construct_named(text 'skywalking', text 'mer'))); +-- +-- SELECT name(equipment_named_ambiguous_1a(hobby_construct_named(text 'skywalking', text 'mer'))); +-- +-- SELECT name(equipment_named_ambiguous_1b(hobby_construct_named(text 'skywalking', text 'mer'))); +-- +-- SELECT name(equipment_named_ambiguous_1c(hobby_construct_named(text 'skywalking', text 'mer'))); +-- +-- SELECT name(equipment_named_ambiguous_2a(text 'skywalking')); +-- +-- SELECT name(equipment_named_ambiguous_2b(text 'skywalking')) ORDER BY 1; +-- +-- SELECT hobbies_by_name('basketball'); +-- +-- SELECT name, overpaid(emp.*) FROM emp ORDER BY 1,2; +-- +-- -- +-- -- Try a few cases with SQL-spec row constructor expressions +-- -- +-- SELECT * FROM equipment(ROW('skywalking', 'mer')); +-- +-- SELECT name(equipment(ROW('skywalking', 'mer'))); +-- +-- SELECT *, name(equipment(h.*)) FROM hobbies_r h ORDER BY 1,2,3; +-- +-- SELECT *, (equipment(CAST((h.*) AS hobbies_r))).name FROM hobbies_r h ORDER BY 1,2,3; -- -- check that old-style C functions work properly with TOASTed values -- |