Skip to content

Commit 8ea6d68

Browse files
committed
Fix minor SQL fomatting issues in TAP tests
Found a couple of places I had missed hwne cleaning up the SQL style in our TAP tests.
1 parent a6eb046 commit 8ea6d68

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

t/028_temp_block.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565

6666
($cmdret, $stdout, $stderr) = $node->psql(
6767
'postgres',
68-
' CREATE TABLE t1(a int);',
68+
' CREATE TABLE t1 (a int);',
6969
extra_params => [ '-a', '-Pformat=aligned', '-Ptuples_only=off' ]);
7070
is($cmdret, 0, "CREATE Table t1");
7171
PGSM::append_to_file($stdout);

t/030_histogram.pl

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,21 @@ BEGIN
2424
WHILE iterator < loops LOOP
2525
RAISE INFO 'Current timestamp: %', timeofday()::timestamp;
2626
RAISE INFO 'Sleep % seconds', iterator;
27-
PERFORM pg_sleep(iterator);
27+
PERFORM pg_sleep(iterator);
2828
iterator := iterator + iterator;
2929
END LOOP;
3030
END;
3131
\$\$ LANGUAGE plpgsql;";
3232

3333
my $generate_histogram_function_sql = "CREATE FUNCTION generate_histogram()
34-
RETURNS TABLE (
35-
range text, freq int, bar text
36-
) AS \$\$
34+
RETURNS TABLE (range text, freq int, bar text) AS \$\$
3735
DECLARE
3836
bucket_id int;
3937
query_id bigint;
4038
BEGIN
4139
SELECT bucket INTO bucket_id FROM pg_stat_monitor ORDER BY calls DESC LIMIT 1;
4240
SELECT queryid INTO query_id FROM pg_stat_monitor ORDER BY calls DESC LIMIT 1;
43-
RETURN query
44-
SELECT * FROM histogram(bucket_id, query_id) AS a (range text, freq int, bar text);
41+
RETURN QUERY SELECT * FROM histogram(bucket_id, query_id) AS a (range text, freq int, bar text);
4542
END;
4643
\$\$ LANGUAGE plpgsql;";
4744

0 commit comments

Comments
 (0)