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 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171
|
The extension for PostgreSQL access version 0.7.1
Yukihiro Matsumoto
Eiji Matsumoto
maintainer: Noboru Saitou
- What's this ?
This is the extension library to access a PostgreSQL database from Ruby.
This library works with PostgreSQL 6.5/7.0/7.1/7.2; it probably works
with 6.3 or earlier with slight modification, but not tested at all.
- Requirements
Ruby 1.3.4 or later.
PostgreSQL 6.4/6.5/7.0/7.1/7.2 installed.
- 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-dir=<include file directory>
--with-pgsql-lib-dir=<library directory>
or
--with-pgsql-dir=<dir>
Same as --with-pgsql-include-dir=<dir>/include,
--with-pgsql-lib-dir=<dir>/lib
For example:
ruby extconf.rb --with-pgsql-include-dir=/usr/local/pgsql/include \
--with-pgsql-lib-dir=/usr/local/pgsql/lib
or
ruby extconf.rb --with-pgsql-dir=/usr/local/pgsql/
- How to use ?
You need to specify:
require "postgres"
at the top of your script.
- What functions can I use ?
The list of supported functions are below. See postgres.html for detail.
class PGconn:
class methods:
new
connect
setdb
setdblogin
escape
quote
escape_bytea
methods:
db
host
options
port
tty
status
error
finish
close
reset
user
trace
untrace
exec
query
async_exec
async_query
get_notify
insert_table
putline
getline
endcopy
notifies
lo_import
lo_export
lo_create
lo_open
lo_unlink
client_encoding
set_client_encoding
class PGresult:
methods:
each
[]
status
result
fields
num_tuples
num_fields
fieldname
fieldnum
type
size
getvalue
getlength
cmdstatus
print
clear
class PGlarge:
methods:
open
close
read
write
lseek
tell
unlink
oid
size
export
- 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.
You can redistribute This library and/or modify it under the same term
of Ruby. License of Ruby is included with Ruby distribution in
the file "README".
Please ask Noboru Saitou. Because I am maintainer currently.
- Authors
Yukihiro Matsumoto <matz@ruby-lang.org>
Author of Ruby.
Eiji Matsumoto <usagi@ruby.club.or.jp>
One of users who loves Ruby.
No, we are not literal brothers :-)
- Special Thanks
Guy Decoux ts <decoux@moulon.inra.fr>
- maintainer
Noboru Saitou <noborus@netlab.jp>
|