File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 11# SQLite Foreign Data Wrapper for PostgreSQL
22This PostgreSQL extension is a Foreign Data Wrapper for [ SQLite] [ 1 ] .
3+
34The current version can work with PostgreSQL 9.6, 10, 11 and 12.
45
56## Installation
@@ -40,10 +41,15 @@ CREATE SERVER sqlite_server FOREIGN DATA WRAPPER sqlite_fdw OPTIONS (database '/
4041
4142
4243### Create foreign table
44+ Please specify ` table ` option if SQLite table name is different from foreign table name.
4345<pre >
4446CREATE FOREIGN TABLE t1(a integer, b text) SERVER sqlite_server OPTIONS (table 't1_sqlite');
4547</pre >
4648
49+ If you want to update tables, please add ` OPTIONS (key 'true') ` to a primary key or unique key like the following:
50+ <pre >
51+ CREATE FOREIGN TABLE t1(a integer OPTIONS (key 'true'), b text) SERVER sqlite_server OPTIONS (table 't1_sqlite');
52+ </pre >
4753### Import foreign schema
4854<pre >
4955IMPORT FOREIGN SCHEMA public FROM SERVER sqlite_server INTO public;
You can’t perform that action at this time.
0 commit comments