File: README

package info (click to toggle)
libpgsql-ruby 0.8.0-1.1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 436 kB
  • ctags: 363
  • sloc: ansic: 2,535; ruby: 1,742; makefile: 68
file content (125 lines) | stat: -rw-r--r-- 3,857 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
================================================================================
ruby-pg: Ruby interface to PostgreSQL RDBMS
================================================================================

This library is copyrighted by the authors.

Authors:
  * Yukihiro Matsumoto <matz@ruby-lang.org>
      Author of Ruby.
  * Eiji Matsumoto <usagi@ruby.club.or.jp>
      One of users who loves Ruby.
  * Jeff Davis <ruby-pg@j-davis.com>

Thanks to:
  * Noboru Saitou <noborus@netlab.jp>
      Past maintainer.
  * Dave Lee
      Past maintainer.
  * Guy Decoux   ts <decoux@moulon.inra.fr> 
  
Maintainer:
  Jeff Davis <ruby-pg@j-davis.com>

Copying:
  You may redistribute this software under the terms of the Ruby license,
  included in the file "LICENSE". The Ruby license also allows distribution
  under the terms of the GPL, included in the file "COPYING.txt" and the
  file "GPL".

  Portions of the code are from the PostgreSQL project, and are distributed
  under the terms of the BSD license, included in the file "BSD".

- Summary

This is the extension library to access a PostgreSQL database from Ruby.
This library works with PostgreSQL 7.4 and later.

- Requirements

  Ruby 1.8 or later.
  PostgreSQL 7.3 or later installed.

  It may work with earlier versions as well, but those are
  not regularly tested.

- How to install ?

Follow the instructions below to compile and install:

  ruby extconf.rb
  make
  su              (if necessary)
  make install

You may need to specify the directory name for the include files and the
-lpq library by using

    --with-pgsql-include=<include file directory>
    --with-pgsql-lib=<library directory>

For example:

  ruby extconf.rb --with-pgsql-include=/usr/local/pgsql/include \
                  --with-pgsql-lib=/usr/local/pgsql/lib

- Modules

'pg': The 'pg' module is the newer module, that has been greatly improved, and
  is almost a complete rewrite. It is not backwards compatible. Use this module
  for newly written code. It should be more stable, less buggy, and has more
  features.

'postgres': Older module, maintained for backwards compatibility. It 
  has known flaws that aren't reasonably fixable without breaking backwards
  compatibility. Use this module if you have code that already works, and 
  you just want the fixes that I've committed to this module (for instance,
  this module is compatible with PostgreSQL 8.3).

- How to use ?

This gem builds and installs two PostgreSQL database adapters, 'postgres'
and 'pg'. 

The standard way to download and install the most current stable  
version of the postgres gem (from http://gems.rubyforge.org) is to use  
the RubyGem package manager. You may need to supply RubyGem with the 
location of the libpq library and the libpq.h and libpq/libpq-fs.h 
files, and may need to run as root.
If you installed from source on a Unix system you can locate these  
libpq files with:
find <path to install directory> -name "libpq-fe.h" -print
With binary distributions, you may need to install additional  
PostgreSQL development libraries to get these files.

Then run:
sudo gem install postgres -- --with-pgsql-include-dir=<location of  
Postgresql>/include --with-pgsql-lib-dir=<location of Postgresql/lib

Example:
on Mac OS X with PostgreSQL in /Library/PostgreSQL8 use
--with-pgsql-include-dir=/Library/PostgreSQL8/include --with-pgsql-lib- 
dir=/Library/PostgreSQL8/lib

To use the module with Rails:
refer to it as
adapter: postgresql
in your database:yaml file

To use these modules in Ruby directly (not Rails), refer to the RDoc
documentation.

- Acknowledgments

We are thankful to the people at the ruby-list and ruby-dev mailing lists.
And to the people who developed PostgreSQL.

- Copying

This library is copyrighted by its authors; Yukihiro Matsumoto, and Eiji
Matsumoto.

Portions copyright Laika, Inc.