apache / shardingsphere

Empowering Data Intelligence with Distributed SQL for Sharding, Scalability, and Security Across All Databases.
Apache License 2.0
20.01k stars 6.76k forks source link

Proxy PostgreSQL doesn't support PREPARE & EXECUTE #10248

Open TeslaCN opened 3 years ago

TeslaCN commented 3 years ago

Feature Request

Is your feature request related to a problem?

Describe the feature you would like.

PostgreSQL

When I use psql connect PostgreSQL directly

elasticjob=# prepare select_by_ip as select * from job_execution_log where ip = $1 limit 3;
PREPARE

elasticjob=# execute select_by_ip ('192.168.3.233');
                  id                  |  job_name  |                              task_id                               |   hostname    |      ip       | shard
ing_item | execution_source | failure_cause | is_success |       start_time        |      complete_time      
--------------------------------------+------------+--------------------------------------------------------------------+---------------+---------------+------
---------+------------------+---------------+------------+-------------------------+-------------------------
 3a13b73a-1287-4011-814f-06e72e5e4631 | my-dag-job | my-dag-job@-@0,1,2,3,4,5,6,7,8,9@-@READY@-@192.168.3.233@-@1951901 | local-wwj-icu | 192.168.3.233 |      
       1 | NORMAL_TRIGGER   |               | t          | 2020-09-14 20:18:20.097 | 2020-09-14 20:18:20.098
 8448933a-545d-4508-b446-d0a0d565f5ca | simple     | simple@-@0,1,2@-@READY@-@192.168.3.233@-@3501515                   | local-wwj-icu | 192.168.3.233 |      
       1 | NORMAL_TRIGGER   |               | t          | 2020-09-04 23:17:35.162 | 2020-09-04 23:17:35.174
 7150464c-674e-4e81-a43b-b11a7b1099df | simple     | simple@-@0,1,2@-@READY@-@192.168.3.233@-@3501515                   | local-wwj-icu | 192.168.3.233 |      
       2 | NORMAL_TRIGGER   |               | t          | 2020-09-04 23:17:35.162 | 2020-09-04 23:17:35.174
(3 rows)

Proxy PostgreSQL

hello_ss=> prepare select_by_user as select * from t_order where user_id = $1;
ERROR:  You have an error in your SQL syntax
github-actions[bot] commented 2 years ago

Hello , this issue has not received a reply for several days. This issue is supposed to be closed.