Change intermediate_results test to not crash

pull/2071/merge
Brian Cloutier 2018-04-05 11:38:11 -07:00 committed by Brian Cloutier
parent 0104790385
commit d02f761d8e
3 changed files with 8 additions and 6 deletions

View File

@ -230,8 +230,8 @@ END;
-- pipe query output into a result file and create a table to check the result -- pipe query output into a result file and create a table to check the result
COPY (SELECT s, s*s FROM generate_series(1,5) s) COPY (SELECT s, s*s FROM generate_series(1,5) s)
TO PROGRAM TO PROGRAM
$$psql -h localhost -p 57636 -U postgres -d regression -c "BEGIN; COPY squares FROM STDIN WITH (format result); CREATE TABLE intermediate_results.squares AS SELECT * FROM read_intermediate_result('squares', 'binary') AS res(x int, x2 int); END;"$$ $$psql -h localhost -p 57636 -U postgres -d regression -c "BEGIN; COPY squares FROM STDIN WITH (format result); CREATE TABLE intermediate_results.squares AS SELECT * FROM read_intermediate_result('squares', 'text') AS res(x int, x2 int); END;"$$
WITH (FORMAT binary); WITH (FORMAT text);
SELECT * FROM squares ORDER BY x; SELECT * FROM squares ORDER BY x;
x | x2 x | x2
---+---- ---+----

View File

@ -380,12 +380,14 @@ for my $workeroff (0 .. $#followerWorkerPorts)
if ($usingWindows) if ($usingWindows)
{ {
print $fh "--variable=dev_null=\"/nul\" "; print $fh "--variable=dev_null=\"/nul\" ";
print $fh "--variable=temp_dir=\"%TEMP%\\\""; print $fh "--variable=temp_dir=\"%TEMP%\" ";
print $fh "--variable=psql=\"".catfile($bindir, "psql")."\" ";
} }
else else
{ {
print $fh "--variable=dev_null=\"/dev/null\" "; print $fh "--variable=dev_null=\"/dev/null\" ";
print $fh "--variable=temp_dir=\"/tmp/\" "; print $fh "--variable=temp_dir=\"/tmp/\" ";
print $fh "--variable=psql=\"psql\" ";
} }

View File

@ -114,8 +114,8 @@ END;
-- pipe query output into a result file and create a table to check the result -- pipe query output into a result file and create a table to check the result
COPY (SELECT s, s*s FROM generate_series(1,5) s) COPY (SELECT s, s*s FROM generate_series(1,5) s)
TO PROGRAM TO PROGRAM
$$psql -h localhost -p 57636 -U postgres -d regression -c "BEGIN; COPY squares FROM STDIN WITH (format result); CREATE TABLE intermediate_results.squares AS SELECT * FROM read_intermediate_result('squares', 'binary') AS res(x int, x2 int); END;"$$ $$psql -h localhost -p 57636 -U postgres -d regression -c "BEGIN; COPY squares FROM STDIN WITH (format result); CREATE TABLE intermediate_results.squares AS SELECT * FROM read_intermediate_result('squares', 'text') AS res(x int, x2 int); END;"$$
WITH (FORMAT binary); WITH (FORMAT text);
SELECT * FROM squares ORDER BY x; SELECT * FROM squares ORDER BY x;