Coder Social home page Coder Social logo

dblink's Introduction

Dblink version 1.0
==================

Perl module to create dblink views to return results from a remote database.

Before using this module, please ensure to install dblink 0.5 contrib
module in the destination postgresql database. If it is not installed, the 
creation of the remote view would fail.

This module is available along with the source code of postgresql. If you
have not yet downloaded the source code of postgresql, you can visit the
below link to know the postgresql mirror website. Locate one of the nearest
mirror and download postgresql.

www.postgresql.org/mirrors-ftp.html

AUTHOR

  A.Bhuvaneswaran <[email protected]>

RELEASE NOTES

  Version 1.0
    - User defined configuration file (default: ~/.pgpass)
    - Enable/Disable application debug (debug & stdin)
    - Auto detection of data type of the fields of source table

  Version 0.2
    - initial release

INSTALLATION

To install this module type the following:

   perl Makefile.PL
   make
   make test
   make install

DEPENDENCIES

This module requires these other modules and libraries:

  - Postgresql 7.3 or above
  - dblink 0.5 or above
  - DBI 1.21 or above
  - DBD::Pg 1.01 or above
  - Data::Dumper 2.102 or above

DESCRIPTION

Dblink is a perl wrapper for postgresql dblink contrib module. Using this
module, you are able to create dblink views in a database. A dblink view 
can query another database and return the results. It makes an implicit
connection to the remote database.

Refer the document on dblink contrib which is shipped with the source of 
postgresql for details.

create_remote_view(sdbh, ddbh, prepend, table);

sdbh - source database handle (returned by DBI->connect)
ddbh - dest. database handle (returned by DBI->connect)
prepend - text to be prepended to the view (default: dbl_)
table - table for which the view is to be created

If the table is foo, then the name of the view is dbl_foo.

TESTING

  Refer './dblink_test -h' for details. The syntax of the configuration 
should be:

  host:port:dbname:username:password

  For example, if the source database details are in line 1 and dest.
database details are in line 4 and if you wish to create remote view for
table foobar, then run the script as,
  
  $ ./dblink_test -s 1 -d 4 -t foobar
  
Once the dblink view is successfully created, connect to that database
using psql.  Establish a dblink connection via dblink_connect() function.
Do select records from the dblink view. Disconnect the dblink connection
via dblink_disconnect() function.

NOTE: Currently, pg7.3 or above is supported. If you want to use this 
module for earlier versions, please contact me. It is available.

If this information is not enough or if you face any problem during the
installation, please feel free to the contact me.

COPYRIGHT AND LICENCE

		    GNU GENERAL PUBLIC LICENSE
		       Version 2, June 1991

 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

Preamble

  The licenses for most software are designed to take away your
freedom to share and change it.  By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users.  This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it.  (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.)  You can apply it to
your programs, too.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.

  To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have.  You must make sure that they, too, receive or can get the
source code.  And you must show them these terms so they know their
rights.

  We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.

  Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software.  If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.

  Finally, any free program is threatened constantly by software
patents.  We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary.  To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.

dblink's People

Watchers

 avatar  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.