Fix multi test

velioglu/tmpfuncprop
Burak Velioglu 2022-02-14 00:32:37 +03:00
parent a829b7555b
commit 9adef99248
No known key found for this signature in database
GPG Key ID: F6827E620F6549C6
3 changed files with 6 additions and 0 deletions

View File

@ -36,9 +36,11 @@ DEBUG: Plan XXX query after replacing subqueries and CTEs: SELECT table1.id, ta
(1 row)
-- Check joins of a function that returns a single integer
SET citus.enable_metadata_sync TO OFF;
CREATE FUNCTION add(integer, integer) RETURNS integer
AS 'SELECT $1 + $2;'
LANGUAGE SQL;
RESET citus.enable_metadata_sync;
SELECT create_distributed_function('add(integer,integer)');
create_distributed_function
---------------------------------------------------------------------

View File

@ -36,9 +36,11 @@ DEBUG: Plan XXX query after replacing subqueries and CTEs: SELECT table1.id, ta
(1 row)
-- Check joins of a function that returns a single integer
SET citus.enable_metadata_sync TO OFF;
CREATE FUNCTION add(integer, integer) RETURNS integer
AS 'SELECT $1 + $2;'
LANGUAGE SQL;
RESET citus.enable_metadata_sync;
SELECT create_distributed_function('add(integer,integer)');
DEBUG: switching to sequential query execution mode
DETAIL: A distributed function is created. To make sure subsequent commands see the type correctly we need to make sure to use only one connection for all future commands

View File

@ -30,9 +30,11 @@ CREATE SEQUENCE numbers;
SELECT * FROM table1 JOIN nextval('numbers') n ON (id = n) ORDER BY id ASC;
-- Check joins of a function that returns a single integer
SET citus.enable_metadata_sync TO OFF;
CREATE FUNCTION add(integer, integer) RETURNS integer
AS 'SELECT $1 + $2;'
LANGUAGE SQL;
RESET citus.enable_metadata_sync;
SELECT create_distributed_function('add(integer,integer)');
SELECT * FROM table1 JOIN add(3,5) sum ON (id = sum) ORDER BY id ASC;