TeslaCN opened a new issue #14680:
URL: https://github.com/apache/shardingsphere/issues/14680


   ## Feature Request
   
   ### Is your feature request related to a problem?
   Related to #10814.
   The ShardingSphere-Proxy PostgreSQL doesn't support DESCRIBE prepared 
statement yet because we cannot fetch the metadata of parameters and result set 
unless we execute the SQL. If we can preview SQL with parameter placeholders, 
the logic can be also used for implementing. 
   
   ### Describe the feature you would like.
   
   **Supports previewing SQL with parameter placeholders rather than throwing 
exceptions.**
   ```
   sbtest_sharding=> preview select * from sbtest1;
    data_source_name |                                                          
                                                               
                                              sql                               
                                                               
                                                                         
   
------------------+-------------------------------------------------------------------------------------------------------------------------
   
--------------------------------------------------------------------------------------------------------------------------------------------
   ----------------------------------------------------------------------
    ds_0             | select * from sbtest1_0 UNION ALL select * from 
sbtest1_1 UNION ALL select * from sbtest1_2 UNION ALL select * from sbte
   st1_3 UNION ALL select * from sbtest1_4 UNION ALL select * from sbtest1_5 
UNION ALL select * from sbtest1_6 UNION ALL select * from sbtest1_
   7 UNION ALL select * from sbtest1_8 UNION ALL select * from sbtest1_9
    ds_1             | select * from sbtest1_0 UNION ALL select * from 
sbtest1_1 UNION ALL select * from sbtest1_2 UNION ALL select * from sbte
   st1_3 UNION ALL select * from sbtest1_4 UNION ALL select * from sbtest1_5 
UNION ALL select * from sbtest1_6 UNION ALL select * from sbtest1_
   7 UNION ALL select * from sbtest1_8 UNION ALL select * from sbtest1_9
   (2 rows)
   
   sbtest_sharding=> preview select * from sbtest1 where id = ?;
   ERROR:  Parameter marker expression must have corresponding parameter value.
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to