curcur commented on a change in pull request #15720:
URL: https://github.com/apache/flink/pull/15720#discussion_r620850140



##########
File path: docs/content/docs/connectors/datastream/jdbc.md
##########
@@ -167,15 +177,24 @@ env
                     ps.setDouble(4, t.price);
                     ps.setInt(5, t.qty);
                 },
-                JdbcExecutionOptions.builder().build(),
+                JdbcExecutionOptions.builder()
+                    .withMaxRetries(0)
+                    .build(),
                 JdbcExactlyOnceOptions.defaults(),
                 () -> {
                     // create a driver-specific XA DataSource
+                    // The following example is for derby 
                     EmbeddedXADataSource ds = new EmbeddedXADataSource();
                     ds.setDatabaseName("my_db");
                     return ds;
                 });
 env.execute();
 ```
+Postgres XADataSource Example:
+```java
+PGXADataSource pgxaDataSource = new PGXADataSource();
+pgxaDataSource.setUrl(
+"jdbc:postgresql://localhost:5432/postgres");

Review comment:
       Yes, usually it should.
   
   My intention for this example is to make this example "runnable out of box"; 
That says if user copy-paste the example to its IDE, and has postgres installed 
with default set up, it would work.
   
   I installed postgre and `postgres` is the default table can be accessed 
without username and password or default (username and password).
   
   
   




-- 
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:
us...@infra.apache.org


Reply via email to