mirror of https://github.com/citusdata/citus.git
Change intermediate_results test to not crash
parent
0104790385
commit
d02f761d8e
|
@ -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
|
||||||
---+----
|
---+----
|
||||||
|
|
|
@ -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\" ";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue