Giter Club home page Giter Club logo

www_fdw's Introduction

www_fdw

This library contains a PostgreSQL extension, a Foreign Data Wrapper (FDW) handler of PostgreSQL which provides easy way for interacting with different web-services.

Installation

$ export USE_PGXS=1
$ make && make install
$ psql -c "CREATE EXTENSION www_fdw" db

After that you need to create server for extension. The simpliest example here is:

$ cat test/default-json.sql
DROP EXTENSION IF EXISTS www_fdw CASCADE;
CREATE EXTENSION www_fdw;
CREATE SERVER www_fdw_server_test FOREIGN DATA WRAPPER www_fdw OPTIONS (uri 'http://localhost:7777');
CREATE USER MAPPING FOR current_user SERVER www_fdw_server_test;
CREATE FOREIGN TABLE www_fdw_test (
    title text,
    link text,
    snippet text
) SERVER www_fdw_server_test;

For more examples check github wiki.

postgresql versions

XML

For XML support you need to install postgresql server with --with-libxml configure option and (check libxml dependency below).

JSON

For json support in your callbacks you need to install json type for postgresql.

This type is used only for custom callback functions only. Even though, you can parse text representations of json in this case.

Current implementation of postgresql json native type doesn't allow to retrieve fields, thus can't be used in current state.

Documentation

Up-to-date documentation can be found at github.

PostgreSQL server installation

If your response isn't of xml type or you don't plan to use xml parsing in response_deserialize_callback - don't bother about it. Otherwise, in order to work with xml type (used in response_deserialize_callback) your installation has to support xml type. Usually it means building PostgreSQL with --with-libxml option. If you plan to use response_deserialize_callback for xml but with own parsing mechanism - your callback will be passed with text parameter.

Depencencies

This module depends on

The source of libjson is included in this module package and linked as a static library, whereas libcurl is assumed to be installed in the system. You may need additional development packages, as libcurl-dev. Consult your system and repository owner for more details.

Development

Author(s)

Alex Sudakov [email protected]

Copyright and License

This module is free software; you can redistribute it and/or modify it under the PostgreSQL License.

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.

In no event shall author(s) be liable to any party for direct, indirect, special, incidental, or consequential damages, including lost profits, arising out of the use of this software and its documentation, even if author(s) has been advised of the possibility of such damage.

Author(s) specifically disclaims any warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The software provided hereunder is on an "as is" basis, and author(s) has no obligations to provide maintenance, support, updates, enhancements, or modifications.

www_fdw's People

Contributors

cyga avatar mathroc avatar atlted avatar tvondra avatar brian612 avatar olehs avatar robe2 avatar

Watchers

lfbzhm avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.