Skip to content

kanegoon/sqlite_fdw

 
 

Repository files navigation

SQLite Foreign Data Wrapper for PostgreSQL

This PostgreSQL extension is a Foreign Data Wrapper for SQLite.
This version of sqlite_fdw can work with PostgreSQL 9.6 and 10.

1. Installation

  1. Preapre SQLite library
    Download SQLite source code and Build SQLite

  2. Build and install sqlite_fdw

make
make install

2. Usage

Load extension:

CREATE EXTENSION sqlite_fdw;

Create server specifying SQLite database path as option:

CREATE SERVER sqlite_server FOREIGN DATA WRAPPER sqlite_fdw OPTIONS (database '/tmp/test.db');

Create foreign table:

CREATE FOREIGN TABLE t1(a integer, b text) SERVER sqlite_server OPTIONS (table 't1_sqlite');

Or you can use import foreign schema:

IMPORT FOREIGN SCHEMA public FROM SERVER sqlite_server INTO public;

Access foregin table:

SELECT * FROM t1;

3. Features

  • Support update to foreign table
  • WHERE clauses are pushdowned
  • Aggregate function are pushdowned (PostgreSQL 10 only)
  • Transactions

4. Limitations

Nothing.

5. License

Copyright (c) 2017-2018, TOSHIBA Corporation
Copyright (c) 2011 - 2016, EnterpriseDB Corporation

Permission to use, copy, modify, and distribute this software and its documentation for any purpose, without fee, and without a written agreement is hereby granted, provided that the above copyright notice and this paragraph and the following two paragraphs appear in all copies.

See the LICENSE file for full details.

About

SQLite Foreign Data Wrapper for PostgreSQL

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 89.9%
  • PLpgSQL 3.9%
  • C++ 3.8%
  • SQLPL 1.7%
  • Other 0.7%