MisterRaindrop commented on code in PR #107:
URL: https://github.com/apache/cloudberry-pxf/pull/107#discussion_r3084640629
##########
docs/content/jdbc_pxf.html.md.erb:
##########
@@ -251,18 +270,28 @@ You can override certain properties in a JDBC server
configuration for a specifi
| QUERY_TIMEOUT | jdbc.statement.queryTimeout |
| DATE_WIDE_RANGE | jdbc.date.wideRange |
-Example JDBC connection strings specified via custom options:
-
-``` pre
-&JDBC_DRIVER=org.postgresql.Driver&DB_URL=jdbc:postgresql://pgserverhost:5432/pgtestdb&USER=pguser1&PASS=changeme
-&JDBC_DRIVER=com.mysql.jdbc.Driver&DB_URL=jdbc:mysql://mysqlhost:3306/testdb&USER=user1&PASS=changeme
+For foreign tables:
+```sql
+CREATE SERVER "pgserver" FOREIGN DATA WRAPPER jdbc_pxf_fdw
+ OPTIONS (
+ jdbc_driver 'org.postgresql.Driver',
+ db_url 'jdbc:postgresql://pgserverhost:5432/pgtestdb',
+ user 'pxfuser1',
+ pass 'changeme'
+ );
+CREATE USER MAPPING FOR CURRENT_USER SERVER "pgserver";
+CREATE FOREIGN TABLE pxf_pgtbl(name varchar, age int)
+ SERVER "pgserver"
+ OPTIONS (resource 'public.forpxf_table1');
```
-For example:
-<pre>CREATE EXTERNAL TABLE pxf_pgtbl(name text, orders int)
- LOCATION
('pxf://public.forpxf_table1?PROFILE=jdbc<b>&JDBC_DRIVER=org.postgresql.Driver&DB_URL=jdbc:postgresql://pgserverhost:5432/pgtestdb&USER=pxfuser1&PASS=changeme</b>')
-FORMAT 'CUSTOM' (FORMATTER='pxfwritable_export');</pre>
+For external tables:
+```sql
+CREATE EXTERNAL TABLE pxf_pgtbl(name text, orders int)
+ LOCATION
('pxf://public.forpxf_table1?PROFILE=jdbc&JDBC_DRIVER=org.postgresql.Driver&DB_URL=jdbc:postgresql://pgserverhost:5432/pgtestdb&USER=pxfuser1&PASS=changeme')
+FORMAT 'CUSTOM' (FORMATTER='pxfwritable_export');</pre>
Review Comment:
< /pre >?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]