Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve run_command_on_shards to handle composite data #7913

Open
eaydingol opened this issue Feb 27, 2025 · 0 comments
Open

Improve run_command_on_shards to handle composite data #7913

eaydingol opened this issue Feb 27, 2025 · 0 comments

Comments

@eaydingol
Copy link
Contributor

eaydingol commented Feb 27, 2025

In the implementation, (EvaluateSingleQueryResult) the result of the query is formatted into a string. If the type of the query result is a composite type it puts expected a single row in query result into the text string.

CREATE EXTENSION IF NOT EXISTS pgstattuple;
CREATE EXTENSION IF NOT EXISTS pg_visibility;
---WORKS
SELECT * FROM run_command_on_shards('testcitus', $cmd$ SELECT pgstattuple('%s'); $cmd$);  
shardid | success | result  
---------+---------+------------------------------------------------ 
102729 | t | (16384,294,11466,69.98,15,585,3.57,2664,16.26)  
102730 | t | (16384,310,12090,73.79,17,663,4.05,1872,11.43)  
102731 | t | (16384,296,11544,70.46,13,507,3.09,2648,16.16)  
(3 rows) 
 
--- DOES NOT WORK 
SELECT * FROM run_command_on_shards('testcitus', $cmd$ SELECT pg_visibility_map('%s'); $cmd$);  
shardid | success | result  
---------+---------+---------------------------------------  
102589 | f | expected a single row in query result  
102590 | f | expected a single row in query result  
102591 | f | expected a single row in query result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant