You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/01/13 08:17:52 UTC

[GitHub] [incubator-shardingsphere] zzujustme opened a new issue #3954: Is sharding-jdbc supported postgresql array?Can I customize and implents it?

zzujustme opened a new issue #3954: Is sharding-jdbc supported postgresql array?Can I customize and implents it? 
URL: https://github.com/apache/incubator-shardingsphere/issues/3954
 
 
   ## Question
   
   **For English only**, other languages will not accept.
   
   Before asking a question, make sure you have:
   
   - Googled your question.
   - Searched open and closed [GitHub issues](https://github.com/apache/incubator-shardingsphere/issues).
   - Read documentation: [ShardingSphere Doc](https://shardingsphere.apache.org/document/current/en/overview).
   
   Please pay attention on issues you submitted, because we maybe need more details. 
   If no response **more than 7 days** and we cannot reproduce it on current information, we will **close it**.
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [shardingsphere] hebing0625 commented on issue #3954: Is sharding-jdbc supported postgresql array?Can I customize and implents it?

Posted by GitBox <gi...@apache.org>.
hebing0625 commented on issue #3954:
URL: https://github.com/apache/shardingsphere/issues/3954#issuecomment-766698233


   hi,  
   
   There still has a issue when I try to deal with connect:
   
   `Connection conn = shardingDataSource.getConnection();`
   `conn.createArrayOf("int8", new Long[]{1L, 2L, 3L});`
   
   It will throw SQLFeatureNotSupportedException. 
   
   I trace the codes and find such snippets in SQLFeatureNotSupportedException.java:
   
   `   @Override
   `   public final Array createArrayOf(final String typeName, final Object[] elements) throws SQLException {
   `        throw new SQLFeatureNotSupportedException("createArrayOf");
   `   }
   
   Can you help me how to solve this?


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] tuohai666 commented on issue #3954: Is sharding-jdbc supported postgresql array?Can I customize and implents it?

Posted by GitBox <gi...@apache.org>.
tuohai666 commented on issue #3954:
URL: https://github.com/apache/shardingsphere/issues/3954#issuecomment-664790116


   For Sharding-JDBC, it supports array column.
   For Sharding-Proxy, it will be resolved via https://github.com/apache/shardingsphere/issues/6408 .


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-shardingsphere] SteNicholas commented on issue #3954: Is sharding-jdbc supported postgresql array?Can I customize and implents it?

Posted by GitBox <gi...@apache.org>.
SteNicholas commented on issue #3954: Is sharding-jdbc supported postgresql array?Can I customize and implents it? 
URL: https://github.com/apache/incubator-shardingsphere/issues/3954#issuecomment-592445735
 
 
   @terrymanu I will try it.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] terrymanu commented on issue #3954: Is sharding-jdbc supported postgresql array?Can I customize and implents it?

Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #3954: Is sharding-jdbc supported postgresql array?Can I customize and implents it? 
URL: https://github.com/apache/incubator-shardingsphere/issues/3954#issuecomment-585550616
 
 
   Yes, welcome try to do it

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [shardingsphere] hebing0625 commented on issue #3954: Is sharding-jdbc supported postgresql array?Can I customize and implents it?

Posted by GitBox <gi...@apache.org>.
hebing0625 commented on issue #3954:
URL: https://github.com/apache/shardingsphere/issues/3954#issuecomment-766698233


   hi,  
   
   There still has a issue when I try to deal with connect:
   
   `Connection conn = shardingDataSource.getConnection();`
   `conn.createArrayOf("int8", new Long[]{1L, 2L, 3L});`
   
   It will throw SQLFeatureNotSupportedException. 
   
   I trace the codes and find such snippets in SQLFeatureNotSupportedException.java:
   
   `   @Override
   `   public final Array createArrayOf(final String typeName, final Object[] elements) throws SQLException {
   `        throw new SQLFeatureNotSupportedException("createArrayOf");
   `   }
   
   Can you help me how to solve this?


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] tuohai666 closed issue #3954: Is sharding-jdbc supported postgresql array?Can I customize and implents it?

Posted by GitBox <gi...@apache.org>.
tuohai666 closed issue #3954:
URL: https://github.com/apache/shardingsphere/issues/3954


   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] tuohai666 closed issue #3954: Is sharding-jdbc supported postgresql array?Can I customize and implents it?

Posted by GitBox <gi...@apache.org>.
tuohai666 closed issue #3954:
URL: https://github.com/apache/shardingsphere/issues/3954


   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] sandynz commented on issue #3954: Is sharding-jdbc supported postgresql array?Can I customize and implents it?

Posted by GitBox <gi...@apache.org>.
sandynz commented on issue #3954:
URL: https://github.com/apache/shardingsphere/issues/3954#issuecomment-664786235






----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] sandynz commented on issue #3954: Is sharding-jdbc supported postgresql array?Can I customize and implents it?

Posted by GitBox <gi...@apache.org>.
sandynz commented on issue #3954:
URL: https://github.com/apache/shardingsphere/issues/3954#issuecomment-768370658


   > 
   > 
   > There still has a issue when I try to create array with connection as below:
   > 
   > `Connection conn = shardingDataSource.getConnection();`
   > `conn.createArrayOf("int8", new Long[]{1L, 2L, 3L});`
   > 
   > A SQLFeatureNotSupportedException will be thrown.
   > 
   > I trace the codes and find such snippets in SQLFeatureNotSupportedException.java:
   > 
   > ` @Override` public final Array createArrayOf(final String typeName, final Object[] elements) throws SQLException {
   > ` throw new SQLFeatureNotSupportedException("createArrayOf");` }
   
   Hi @hebing0625 , you're right, `conn.createArrayOf` is not supported for now, and it's not easy to support it.
   There is a workaround, use `java.sql.PreparedStatement.setObject`, e.g. `statement.setObject(1, new long[]{1, 2, 3})`.
   
   The supported primitive array type:
   ```
   long[]
   int[]
   short[]
   byte[]
   double[]
   float[]
   boolean[]
   String[]
   ```
   More details refrence PG JDBC driver: `PgPreparedStatement.setObject` and `PrimitiveArraySupport.isSupportedPrimitiveArray`.
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] tuohai666 edited a comment on issue #3954: Is sharding-jdbc supported postgresql array?Can I customize and implents it?

Posted by GitBox <gi...@apache.org>.
tuohai666 edited a comment on issue #3954:
URL: https://github.com/apache/shardingsphere/issues/3954#issuecomment-664790116


   For Sharding-JDBC, @sandynz , can you reproduce this problem?
   For Sharding-Proxy, it will be resolved via https://github.com/apache/shardingsphere/issues/6408 .


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] hebing0625 edited a comment on issue #3954: Is sharding-jdbc supported postgresql array?Can I customize and implents it?

Posted by GitBox <gi...@apache.org>.
hebing0625 edited a comment on issue #3954:
URL: https://github.com/apache/shardingsphere/issues/3954#issuecomment-766698233


   hi,  
   
   There still has a issue when I try to create array with connection as below:
   
   `Connection conn = shardingDataSource.getConnection();`
   `conn.createArrayOf("int8", new Long[]{1L, 2L, 3L});`
   
   A SQLFeatureNotSupportedException will be thrown.
   
   I trace the codes and find such snippets in SQLFeatureNotSupportedException.java:
   
   `   @Override
   `   public final Array createArrayOf(final String typeName, final Object[] elements) throws SQLException {
   `        throw new SQLFeatureNotSupportedException("createArrayOf");
   `   }
   
   Can you help me how to solve this? @tuohai666 


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] hebing0625 edited a comment on issue #3954: Is sharding-jdbc supported postgresql array?Can I customize and implents it?

Posted by GitBox <gi...@apache.org>.
hebing0625 edited a comment on issue #3954:
URL: https://github.com/apache/shardingsphere/issues/3954#issuecomment-766698233






----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] hebing0625 edited a comment on issue #3954: Is sharding-jdbc supported postgresql array?Can I customize and implents it?

Posted by GitBox <gi...@apache.org>.
hebing0625 edited a comment on issue #3954:
URL: https://github.com/apache/shardingsphere/issues/3954#issuecomment-766698233


   hi,  
   
   There still has a issue when I try to deal with connect:
   
   `Connection conn = shardingDataSource.getConnection();`
   `conn.createArrayOf("int8", new Long[]{1L, 2L, 3L});`
   
   It will throw SQLFeatureNotSupportedException. 
   
   I trace the codes and find such snippets in SQLFeatureNotSupportedException.java:
   
   `   @Override
   `   public final Array createArrayOf(final String typeName, final Object[] elements) throws SQLException {
   `        throw new SQLFeatureNotSupportedException("createArrayOf");
   `   }
   
   Can you help me how to solve this? @tuohai666 


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org