ruby-postgres 0.7.1.2005.11.23
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +261 -0
- data/Contributors +26 -0
- data/MANIFEST +14 -0
- data/README +171 -0
- data/README.ja +183 -0
- data/doc/postgres.html +278 -0
- data/doc/postgres.jp.html +256 -0
- data/extconf.rb +33 -0
- data/libpq-compat.c +253 -0
- data/postgres.c +2433 -0
- data/ruby-postgres.gemspec +35 -0
- data/sample/losample.rb +47 -0
- data/sample/psql.rb +1181 -0
- data/sample/psqlHelp.rb +158 -0
- data/sample/test1.rb +63 -0
- data/sample/test2.rb +44 -0
- data/sample/test4.rb +71 -0
- data/type-oids.h +65 -0
- metadata +64 -0
data/ChangeLog
ADDED
@@ -0,0 +1,261 @@
|
|
1
|
+
Ruby extension library to access PostgreSQL.
|
2
|
+
===========================================
|
3
|
+
|
4
|
+
Tue Dec 14 2004
|
5
|
+
* set_notice_processor: add methods set_notice_processor.
|
6
|
+
Dennis Vshivkov <walrus@amur.ru>
|
7
|
+
|
8
|
+
Sat Nov 6 2004
|
9
|
+
* unescape_bytea: add methods unescape_bytea.
|
10
|
+
patch supplied by "Henry T. So Jr." <henryso@panix.com>
|
11
|
+
|
12
|
+
Sat Oct 9 2004
|
13
|
+
* extconf.rb: VERSION -> RUBY_VERSION.
|
14
|
+
add header check.
|
15
|
+
patch supplied by MoonWolf <moonwolf@moonwolf.com>
|
16
|
+
|
17
|
+
Fri Jul 2 2004
|
18
|
+
* open: add methods open.
|
19
|
+
patch supplied by Leon Brooks <leon-ruby-postgres@cyberknights.com.au>
|
20
|
+
|
21
|
+
Tue Feb 24 2004
|
22
|
+
* postgres.c: add comments.
|
23
|
+
patch supplied by Gavin Kistner <gavin@refinery.com>
|
24
|
+
|
25
|
+
Fri Nov 23 2003
|
26
|
+
* extconf.rb: add ssl support.
|
27
|
+
patch supplied by Martin Hedenfalk <mahe@kth.se>
|
28
|
+
|
29
|
+
Sat Nov 1 2003
|
30
|
+
|
31
|
+
* oid: add methods oid.
|
32
|
+
patch supplied by Ceri Storey <cez@compsoc.man.ac.uk>
|
33
|
+
|
34
|
+
Mon Jan 6 2003 version 0.7.1
|
35
|
+
|
36
|
+
* async_exec: remove check of PQisBusy.
|
37
|
+
patch supplied by <m_seki@mva.biglobe.ne.jp>
|
38
|
+
|
39
|
+
Wed Oct 16 2002 version 0.7.0
|
40
|
+
|
41
|
+
* rename README.jp -> README.ja.
|
42
|
+
|
43
|
+
Thu Oct 10 2002
|
44
|
+
|
45
|
+
* get_notify: bug fix Deletes of unnecessary "free(notify);"
|
46
|
+
debian bug report.
|
47
|
+
|
48
|
+
Wed Oct 9 2002
|
49
|
+
|
50
|
+
* query: add pgresult_clear.
|
51
|
+
patch supplied by "Shirai,Kaoru" <shirai@p1jp.com>
|
52
|
+
|
53
|
+
Sat Sep 28 2002
|
54
|
+
|
55
|
+
* PGconn: add methods escape, quote, escape_bytes.
|
56
|
+
patch supplied by MoonWolf <moonwolf@moonwolf.com>
|
57
|
+
|
58
|
+
Tue Aug 20 2002
|
59
|
+
|
60
|
+
* extconf.rb add dir_config('postgres')
|
61
|
+
patch supplied by Nate Haggard <nate@wordplace.com>
|
62
|
+
|
63
|
+
Mon Jun 3 2002 version 0.7.0-pre2
|
64
|
+
|
65
|
+
* not to use fe_getauthname().
|
66
|
+
patch supplied by Neil Conway <nconway@klamath.dyndns.org>
|
67
|
+
|
68
|
+
Thu May 30 2002 version 0.7.0-pre1
|
69
|
+
|
70
|
+
* Fix to insert_table so that nil values in Ruby are inserted
|
71
|
+
back into the database as nulls.
|
72
|
+
patch supplied by Jeremy Henty <jeremy@chaos.org.uk>
|
73
|
+
|
74
|
+
* Fix to insert_table to protect characters that Postgres would
|
75
|
+
otherwise interpret specially.
|
76
|
+
patch supplied by Jeremy Henty <jeremy@chaos.org.uk>
|
77
|
+
|
78
|
+
Wed Apr 24 2002
|
79
|
+
|
80
|
+
* Removed unused variables.
|
81
|
+
* Improve notification code.
|
82
|
+
* Add a missing "return Qnil" statement in a function
|
83
|
+
declared to return VALUE.
|
84
|
+
* Fix an minor error in pgconn_loopen().
|
85
|
+
patch supplied by Neil Conway <nconway@klamath.dyndns.org>
|
86
|
+
|
87
|
+
Tue Mar 5 2002
|
88
|
+
|
89
|
+
* fix pglarge_write return.
|
90
|
+
patch supplied by Noboru Matui <silicon@mx1.freemail.ne.jp>
|
91
|
+
|
92
|
+
Mon Jan 7 2002
|
93
|
+
|
94
|
+
* refer to POSTGRES_INCLUDE and POSTGTRES_LIB
|
95
|
+
environmental variables.
|
96
|
+
patch supplied by Neil Conway <nconway@klamath.dyndns.org>
|
97
|
+
|
98
|
+
Sun Dec 16 2001
|
99
|
+
|
100
|
+
* add methods "getisnull".
|
101
|
+
patch supplied by Jeremy Henty <jeremy@chaos.org.uk>
|
102
|
+
|
103
|
+
Tue Nov 27 2001
|
104
|
+
|
105
|
+
* convert NULL => nil .
|
106
|
+
patch supplied by "Shirai,Kaoru" <shirai@p1jp.com>
|
107
|
+
|
108
|
+
Mon Nov 19 2001 version 0.6.5 released
|
109
|
+
|
110
|
+
* change my address.
|
111
|
+
Noboru Saitou <noborus@netlab.jp>
|
112
|
+
|
113
|
+
Fri Nov 16 2001
|
114
|
+
|
115
|
+
* default encoding set.
|
116
|
+
Riley <wormwood@speakeasy.org>
|
117
|
+
|
118
|
+
Fri Nov 16 2001
|
119
|
+
|
120
|
+
* add methods "cmdtuples"
|
121
|
+
Gabriel Emerson <gemerson@evalsoft.com>
|
122
|
+
Thanks to greentea@fa2.so-net.ne.jp
|
123
|
+
|
124
|
+
Thu Jul 12 2001
|
125
|
+
|
126
|
+
* psql.rb $OPT_p => $OPT_p.to_i (bug fix).
|
127
|
+
Yuta TSUBOI <yuuta-t@is.aist-nara.ac.jp>
|
128
|
+
|
129
|
+
Mon Apr 23 2001 version 0.6.4 released
|
130
|
+
|
131
|
+
* add include sys/types.h
|
132
|
+
patch supplied by "Akinori MUSHA" <knu@iDaemons.org>.
|
133
|
+
|
134
|
+
Sun Apr 22 2001 version 0.6.3 released
|
135
|
+
|
136
|
+
* document updated.
|
137
|
+
|
138
|
+
Sun Mar 18 2001
|
139
|
+
|
140
|
+
* extern -> EXTERN changed.
|
141
|
+
shibata <kshibata@vesta.ocn.ne.jp>
|
142
|
+
|
143
|
+
Sun Feb 11 2001
|
144
|
+
|
145
|
+
* add methods "async_exec" and "async_query.
|
146
|
+
patch supplied by Andy Yu <is@gnuchina.org>.
|
147
|
+
|
148
|
+
Tue Feb 6 2001 version 0.6.2 released
|
149
|
+
|
150
|
+
* extconf.rb have_func second argument omit.
|
151
|
+
(old ruby version support).
|
152
|
+
|
153
|
+
Mon Feb 5 2001
|
154
|
+
|
155
|
+
* RSTRING(*)->ptr -> STR2CSTR(*) changed.
|
156
|
+
|
157
|
+
Sun Feb 4 2001
|
158
|
+
|
159
|
+
* README and README.jp copying are unified to Ruby's.
|
160
|
+
|
161
|
+
Wed Jan 31 2001
|
162
|
+
|
163
|
+
* postgres.html bug fix and better.
|
164
|
+
patch supplied by Neil Conway <nconway@klamath.dyndns.org>.
|
165
|
+
|
166
|
+
* README bug fix and better.
|
167
|
+
patch supplied by Neil Conway <nconway@klamath.dyndns.org>.
|
168
|
+
|
169
|
+
Sat Jan 27 2001
|
170
|
+
|
171
|
+
* extconf.rb add error message for
|
172
|
+
Could not find PostgreSQL libraries.
|
173
|
+
patch supplied by Neil Conway <nconway@klamath.dyndns.org>.
|
174
|
+
|
175
|
+
Tue Jan 23 2001
|
176
|
+
|
177
|
+
* add methods "initialize".
|
178
|
+
patch supplied by <matz@zetabits.com>.
|
179
|
+
|
180
|
+
Sun Dec 17 2000
|
181
|
+
|
182
|
+
* 8192 byte limit removed.
|
183
|
+
|
184
|
+
Tue Oct 11 2000
|
185
|
+
|
186
|
+
* methods name lo* -> lo_* changed.
|
187
|
+
|
188
|
+
* extconf.rb bug fix.
|
189
|
+
have_func("PQsetClientEncoding")
|
190
|
+
|
191
|
+
Thu Jun 30 2000 version 0.6.1 released
|
192
|
+
|
193
|
+
* change receive parameter with VALUE.
|
194
|
+
(exec, insert_table, putline)
|
195
|
+
|
196
|
+
* insert_table: remove debug print.
|
197
|
+
|
198
|
+
* insert_table bug fix.
|
199
|
+
patch supplied by "Okada Jun" <yun@be-in.org>.
|
200
|
+
|
201
|
+
* extconf.rb ClientEncoding->SetClientEnocoding.
|
202
|
+
|
203
|
+
Sun May 21 2000 version 0.6.0 released
|
204
|
+
|
205
|
+
* change the maintainer with
|
206
|
+
Noboru Saitou <noborus@mb.kcom.ne.jp>.
|
207
|
+
|
208
|
+
* add provided clientEnocoding and setClientEncoding.
|
209
|
+
|
210
|
+
* replace rb_str_new with rb_tainted_str_new.
|
211
|
+
ts <decoux@moulon.inra.fr>
|
212
|
+
|
213
|
+
* add provided Large Object support!
|
214
|
+
|
215
|
+
* error message changed PQerrorMessage() use.
|
216
|
+
|
217
|
+
Fri Feb 25 2000 version 0.5.4 released
|
218
|
+
|
219
|
+
* PGError should be subclass of StandardError.
|
220
|
+
|
221
|
+
Fri Aug 6 1999 version 0.5.3 released
|
222
|
+
|
223
|
+
* use PQsetdbLogin() instead of PQsetdb().
|
224
|
+
patch supplied by <kasa@air.linkclub.or.jp>.
|
225
|
+
|
226
|
+
Tue Jul 30 1999 version 0.5.2 released
|
227
|
+
|
228
|
+
* document updated.
|
229
|
+
* better Ruby 1.3 support.
|
230
|
+
|
231
|
+
Tue Jul 13 1999 version 0.5.1 released
|
232
|
+
|
233
|
+
* modified for Ruby 1.3.x or later.
|
234
|
+
|
235
|
+
Wed Jan 20 1999 version 0.4.1 released
|
236
|
+
|
237
|
+
* Makefile.rb, extconf.rb: trivial bug fix.
|
238
|
+
|
239
|
+
Thu Dec 12 1997 version 0.4 released
|
240
|
+
|
241
|
+
* PGresult: add new method -- each{}, [] --
|
242
|
+
* provided Makefile.rb for ruby-1.1b
|
243
|
+
|
244
|
+
Thu Sep 25 1997 version 0.3.1 released
|
245
|
+
|
246
|
+
* extconf.rb bug fix.
|
247
|
+
* documentation about 'How to install'
|
248
|
+
|
249
|
+
Mon Sep 4 1997 version 0.3 released
|
250
|
+
|
251
|
+
* remove restrictions about japanese EUC characters.
|
252
|
+
* parseArgs related bug fix.
|
253
|
+
|
254
|
+
Mon Sep 2 1997 version 0.2 released
|
255
|
+
|
256
|
+
* provided psql.rb. (an interactive interface for PostgreSQL)
|
257
|
+
* some bug fixes.
|
258
|
+
|
259
|
+
Mon Aug 22 1997 version 0.1 released
|
260
|
+
|
261
|
+
* first release.
|
data/Contributors
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
Dennis Vshivkov <walrus@amur.ru>
|
2
|
+
Gabriel Emerson <gemerson@evalsoft.com>
|
3
|
+
Noboru Saitou <noborus@netlab.jp>
|
4
|
+
Akinori MUSHA <knu@iDaemons.org>
|
5
|
+
Andy Yu <is@gnuchina.org>
|
6
|
+
Ceri Storey <cez@compsoc.man.ac.uk>
|
7
|
+
Gavin Kistner <gavin@refinery.com>
|
8
|
+
Henry T. So Jr. <henryso@panix.com>
|
9
|
+
Jeremy Henty <jeremy@chaos.org.uk>
|
10
|
+
<kasa@air.linkclub.or.jp>
|
11
|
+
Leon Brooks <leon-ruby-postgres@cyberknights.com.au>
|
12
|
+
Martin Hedenfalk <mahe@kth.se>
|
13
|
+
<matz@zetabits.com>
|
14
|
+
MoonWolf <moonwolf@moonwolf.com>
|
15
|
+
<m_seki@mva.biglobe.ne.jp>
|
16
|
+
Nate Haggard <nate@wordplace.com>
|
17
|
+
Neil Conway <nconway@klamath.dyndns.org>
|
18
|
+
Noboru Matui <silicon@mx1.freemail.ne.jp>
|
19
|
+
Okada Jun <yun@be-in.org>
|
20
|
+
Shirai,Kaoru <shirai@p1jp.com>
|
21
|
+
Riley <wormwood@speakeasy.org>
|
22
|
+
shibata <kshibata@vesta.ocn.ne.jp>
|
23
|
+
<greentea@fa2.so-net.ne.jp>
|
24
|
+
ts <decoux@moulon.inra.fr>
|
25
|
+
Yuta TSUBOI <yuuta-t@is.aist-nara.ac.jp>
|
26
|
+
meadow.nnick@gmail.com
|
data/MANIFEST
ADDED
data/README
ADDED
@@ -0,0 +1,171 @@
|
|
1
|
+
The extension for PostgreSQL access version 0.7.1
|
2
|
+
|
3
|
+
Yukihiro Matsumoto
|
4
|
+
Eiji Matsumoto
|
5
|
+
|
6
|
+
maintainer: Noboru Saitou
|
7
|
+
- What's this ?
|
8
|
+
|
9
|
+
This is the extension library to access a PostgreSQL database from Ruby.
|
10
|
+
This library works with PostgreSQL 6.5/7.0/7.1/7.2; it probably works
|
11
|
+
with 6.3 or earlier with slight modification, but not tested at all.
|
12
|
+
|
13
|
+
- Requirements
|
14
|
+
|
15
|
+
Ruby 1.3.4 or later.
|
16
|
+
PostgreSQL 6.4/6.5/7.0/7.1/7.2 installed.
|
17
|
+
|
18
|
+
- How to install ?
|
19
|
+
|
20
|
+
Follow the instructions below to compile and install:
|
21
|
+
|
22
|
+
ruby extconf.rb
|
23
|
+
make
|
24
|
+
su (if necessary)
|
25
|
+
make install
|
26
|
+
|
27
|
+
You may need to specify the directory name for the include files and the
|
28
|
+
-lpq library by using
|
29
|
+
|
30
|
+
--with-pgsql-include-dir=<include file directory>
|
31
|
+
--with-pgsql-lib-dir=<library directory>
|
32
|
+
or
|
33
|
+
--with-pgsql-dir=<dir>
|
34
|
+
Same as --with-pgsql-include-dir=<dir>/include,
|
35
|
+
--with-pgsql-lib-dir=<dir>/lib
|
36
|
+
|
37
|
+
|
38
|
+
For example:
|
39
|
+
|
40
|
+
ruby extconf.rb --with-pgsql-include-dir=/usr/local/pgsql/include \
|
41
|
+
--with-pgsql-lib-dir=/usr/local/pgsql/lib
|
42
|
+
or
|
43
|
+
ruby extconf.rb --with-pgsql-dir=/usr/local/pgsql/
|
44
|
+
|
45
|
+
- How to use ?
|
46
|
+
|
47
|
+
You need to specify:
|
48
|
+
|
49
|
+
require "postgres"
|
50
|
+
|
51
|
+
at the top of your script.
|
52
|
+
|
53
|
+
- What functions can I use ?
|
54
|
+
|
55
|
+
The list of supported functions are below. See postgres.html for detail.
|
56
|
+
|
57
|
+
class PGconn:
|
58
|
+
|
59
|
+
class methods:
|
60
|
+
new
|
61
|
+
connect
|
62
|
+
setdb
|
63
|
+
setdblogin
|
64
|
+
|
65
|
+
escape
|
66
|
+
quote
|
67
|
+
escape_bytea
|
68
|
+
|
69
|
+
methods:
|
70
|
+
db
|
71
|
+
host
|
72
|
+
options
|
73
|
+
port
|
74
|
+
tty
|
75
|
+
status
|
76
|
+
error
|
77
|
+
finish
|
78
|
+
close
|
79
|
+
reset
|
80
|
+
user
|
81
|
+
trace
|
82
|
+
untrace
|
83
|
+
|
84
|
+
exec
|
85
|
+
query
|
86
|
+
async_exec
|
87
|
+
async_query
|
88
|
+
get_notify
|
89
|
+
insert_table
|
90
|
+
putline
|
91
|
+
getline
|
92
|
+
endcopy
|
93
|
+
notifies
|
94
|
+
|
95
|
+
lo_import
|
96
|
+
lo_export
|
97
|
+
lo_create
|
98
|
+
lo_open
|
99
|
+
lo_unlink
|
100
|
+
|
101
|
+
client_encoding
|
102
|
+
set_client_encoding
|
103
|
+
|
104
|
+
class PGresult:
|
105
|
+
|
106
|
+
methods:
|
107
|
+
each
|
108
|
+
[]
|
109
|
+
status
|
110
|
+
result
|
111
|
+
fields
|
112
|
+
num_tuples
|
113
|
+
num_fields
|
114
|
+
fieldname
|
115
|
+
fieldnum
|
116
|
+
type
|
117
|
+
size
|
118
|
+
getvalue
|
119
|
+
getlength
|
120
|
+
cmdstatus
|
121
|
+
print
|
122
|
+
clear
|
123
|
+
|
124
|
+
class PGlarge:
|
125
|
+
|
126
|
+
methods:
|
127
|
+
open
|
128
|
+
close
|
129
|
+
read
|
130
|
+
write
|
131
|
+
lseek
|
132
|
+
tell
|
133
|
+
unlink
|
134
|
+
oid
|
135
|
+
size
|
136
|
+
export
|
137
|
+
|
138
|
+
- Acknowledgments
|
139
|
+
|
140
|
+
We are thankful to the people at the ruby-list and ruby-dev mailing lists.
|
141
|
+
And to the people who developed PostgreSQL.
|
142
|
+
|
143
|
+
- Copying
|
144
|
+
|
145
|
+
This library is copyrighted by its authors; Yukihiro Matsumoto, and Eiji
|
146
|
+
Matsumoto.
|
147
|
+
|
148
|
+
You can redistribute This library and/or modify it under the same term
|
149
|
+
of Ruby. License of Ruby is included with Ruby distribution in
|
150
|
+
the file "README".
|
151
|
+
|
152
|
+
Please ask Noboru Saitou. Because I am maintainer currently.
|
153
|
+
|
154
|
+
- Authors
|
155
|
+
|
156
|
+
Yukihiro Matsumoto <matz@ruby-lang.org>
|
157
|
+
Author of Ruby.
|
158
|
+
|
159
|
+
Eiji Matsumoto <usagi@ruby.club.or.jp>
|
160
|
+
One of users who loves Ruby.
|
161
|
+
|
162
|
+
No, we are not literal brothers :-)
|
163
|
+
|
164
|
+
- Special Thanks
|
165
|
+
|
166
|
+
Guy Decoux ts <decoux@moulon.inra.fr>
|
167
|
+
|
168
|
+
- maintainer
|
169
|
+
|
170
|
+
Noboru Saitou <noborus@netlab.jp>
|
171
|
+
|
data/README.ja
ADDED
@@ -0,0 +1,183 @@
|
|
1
|
+
PostgreSQL$BMQ3HD%%i%$%V%i%j(B version 0.7.1
|
2
|
+
|
3
|
+
$B$^$D$b$H(B $B$f$-$R$m(B
|
4
|
+
$B$^$D$b$H(B $B$($$$8(B
|
5
|
+
|
6
|
+
$B@$OC?M(B: $B@FF#(B $BEP(B
|
7
|
+
|
8
|
+
- What's this ?
|
9
|
+
|
10
|
+
$BK\%i%$%V%i%j$O!"(BRuby$B$+$i(BPostgreSQL$B$X%"%/%;%9$9$k$?$a$N3HD%%i%$%V%i%j$G$9!#(B
|
11
|
+
$B%5%]!<%H$7$F$$$k(BPostgreSQL$B$N%P!<%8%g%s$O!"(B6.5/7.0/7.1/7.2 $B$G$9!#(B6.3$B0JA0$N(B
|
12
|
+
$B%P!<%8%g%s$G$b(B($B$A$g$C$H$7$?JQ99$G(B)$BF0:n$9$k$H;W$$$^$9$,!"%F%9%H$7$F$$$^$;$s!#(B
|
13
|
+
|
14
|
+
- How to install ?
|
15
|
+
*** requirement ***
|
16
|
+
PostgreSQL module$B$r;H$&$s$G$9$+$i!$EvA3(BPostgreSQL$B$OI,MW$G$9$M!%:#$N$H$3$m(B
|
17
|
+
$B%m!<%+%k$K(BPostgreSQL$B$,%$%s%9%H!<%k$5$l$F$$$k$3$H$rA0Ds$K$7$F$$$^$9$,!$(B
|
18
|
+
$BI,MW$J%X%C%@$H(Blibpq$B$5$($"$l$P!$%5!<%P$OI,$:$7$b%m!<%+%k$GF0:n$7$F$$$kI,MW(B
|
19
|
+
$B$O$"$j$^$;$s!%(B
|
20
|
+
|
21
|
+
$B%G%U%)%k%H$G$O!$(BPostgreSQL$B$,(B/usr/local/pgsql$BG[2<$K%$%s%9%H!<%k$5$l$F$$$k(B
|
22
|
+
$B$H$7$F$$$^$9!%JL$N>l=j$K%$%s%9%H!<%k$7$F$$$k>l9g$K$O!$4D6-JQ?t(BPGLIB$B$K(Blibpq
|
23
|
+
$B%i%$%V%i%j$,CV$$$F$"$k(Bdirectory$B$K@_Dj$7$F2<$5$$!#(B
|
24
|
+
|
25
|
+
$BG$0U$N>l=j$G!$$3$N%"!<%+%$%V$rE83+$7$F$/$@$5$$!%8e$O(B
|
26
|
+
|
27
|
+
ruby extconf.rb
|
28
|
+
make
|
29
|
+
su ($B$b$7I,MW$J$i(B)
|
30
|
+
make install
|
31
|
+
|
32
|
+
$B$H$9$k$@$1$G$9!%(BPostgreSQL$B$N%$%s%/%k!<%I%U%!%$%k!"%i%$%V%i%j%U%!%$%k$N(B
|
33
|
+
$B%$%s%9%H!<%k>l=j$,I8=`$N0LCV$G$O$J$/%3%s%Q%$%i$,8+IU$1$k$3$H$,$G$-$J$$(B
|
34
|
+
$B>l9g$K$O(B
|
35
|
+
|
36
|
+
--with-pgsql-include-dir=<$B%$%s%/%k!<%I%U%!%$%k%G%#%l%/%H%j(B>
|
37
|
+
--with-pgsql-lib-dir=<$B%i%$%V%i%j%G%#%l%/%H%j(B>
|
38
|
+
$B$^$?$O(B
|
39
|
+
--with-pgsql-dir=<$B%G%#%l%/%H%j(B>
|
40
|
+
$B$3$l$O0J2<$N$h$&$K;XDj$7$?$H$-$H$*$J$8$G$9!#(B
|
41
|
+
--with-pgsql-include-dir=<$B%G%#%l%/%H%j(B>/include
|
42
|
+
--with-pgsql-lib-dir=<$B%G%#%l%/%H%j(B>/lib
|
43
|
+
|
44
|
+
|
45
|
+
$BNc$($P(B
|
46
|
+
|
47
|
+
ruby extconf.rb --with-pgsql-include-dir=/usr/local/pgsql/include \
|
48
|
+
--with-pgsql-lib-dir=/usr/local/pgsql/lib
|
49
|
+
$B$^$?$O(B
|
50
|
+
ruby extconf.rb --with-pgsql-dir=/usr/local/pgsql
|
51
|
+
|
52
|
+
$B$N$h$&$K;XDj$7$F$/$@$5$$!#(B
|
53
|
+
|
54
|
+
- How to use ?
|
55
|
+
|
56
|
+
require "postgres"
|
57
|
+
|
58
|
+
$B$H$7$F$+$i8f;HMQ2<$5$$!#(B
|
59
|
+
|
60
|
+
- What function can I use ?
|
61
|
+
|
62
|
+
$B4pK\E*$K!"(BC$B$N(Blibpq$B%$%s%?%U%'!<%9$GDj5A$5$l$F$$$k4X?t$O%5%]!<%H$7$F$$$^$9!#(B
|
63
|
+
ver 0.6.0 $B$+$i?7$7$/(B Large Object $B%$%s%?!<%U%'%$%9$,DI2C$5$l$^$7$?!#(B
|
64
|
+
|
65
|
+
$B%5%]!<%H$7$F$$$k%a%=%C%I$N0lMw$O0J2<$NDL$j$G$9!#(B
|
66
|
+
|
67
|
+
PGconn$B%/%i%9(B:
|
68
|
+
|
69
|
+
$B%/%i%9%a%=%C%I(B
|
70
|
+
new
|
71
|
+
connect
|
72
|
+
setdb
|
73
|
+
setdblogin
|
74
|
+
escape
|
75
|
+
quote
|
76
|
+
escape_bytea
|
77
|
+
|
78
|
+
$B%a%=%C%I(B
|
79
|
+
db
|
80
|
+
host
|
81
|
+
options
|
82
|
+
port
|
83
|
+
tty
|
84
|
+
status
|
85
|
+
error
|
86
|
+
finish
|
87
|
+
close
|
88
|
+
reset
|
89
|
+
user
|
90
|
+
trace
|
91
|
+
untrace
|
92
|
+
|
93
|
+
exec
|
94
|
+
query
|
95
|
+
async_exec
|
96
|
+
async_query
|
97
|
+
get_notify
|
98
|
+
insert_table
|
99
|
+
putline
|
100
|
+
getline
|
101
|
+
endcopy
|
102
|
+
notifies
|
103
|
+
|
104
|
+
lo_import
|
105
|
+
lo_export
|
106
|
+
lo_create
|
107
|
+
lo_open
|
108
|
+
lo_unlink
|
109
|
+
|
110
|
+
client_encoding
|
111
|
+
set_client_encoding
|
112
|
+
|
113
|
+
PGresult$B%/%i%9(B:
|
114
|
+
|
115
|
+
$B%a%=%C%I(B
|
116
|
+
each
|
117
|
+
[]
|
118
|
+
status
|
119
|
+
result
|
120
|
+
fields
|
121
|
+
num_tuples
|
122
|
+
num_fields
|
123
|
+
fieldname
|
124
|
+
fieldnum
|
125
|
+
type
|
126
|
+
size
|
127
|
+
getvalue
|
128
|
+
getlength
|
129
|
+
cmdstatus
|
130
|
+
print
|
131
|
+
clear
|
132
|
+
|
133
|
+
PGlarge$B%/%i%9(B:
|
134
|
+
|
135
|
+
$B%a%=%C%I(B
|
136
|
+
open
|
137
|
+
close
|
138
|
+
read
|
139
|
+
write
|
140
|
+
lseek
|
141
|
+
tell
|
142
|
+
unlink
|
143
|
+
oid
|
144
|
+
size
|
145
|
+
export
|
146
|
+
|
147
|
+
- Acknowledgement
|
148
|
+
|
149
|
+
$BK\3HD%%i%$%V%i%j$r:n@.$9$k$K$"$?$C$F!"(Bruby-list, ruby-dev,
|
150
|
+
ruby-talk,$B5Z$S(B pgsql-jp$B%a!<%j%s%0%j%9%H$N%a%s%P!<$K!"B?$/$NM-1W$J(B
|
151
|
+
$B%"%I%P%$%9$rD:$-$^$7$?!#$3$3$K46<U$N0U$rI=$7$^$9!#(B
|
152
|
+
|
153
|
+
- Copying
|
154
|
+
|
155
|
+
$BK\3HD%%i%$%V%i%j$NCx:n8"$O!"$^$D$b$H(B $B$f$-$R$m$H$^$D$b$H(B $B$($$$8$,(B
|
156
|
+
$BJ];}$7$^$9!#(B
|
157
|
+
|
158
|
+
$BK\3HD%%i%$%V%i%j$O!"(BRuby$BK\BN$HF1$8G[I[>r7o$K=>$C$F:FG[I[$9$k$3$H(B
|
159
|
+
$B$,$G$-$^$9!#(BRuby$BK\BN$NG[I[>r7o$K$D$$$F$O!"(BRuby$BG[I[J*Cf$N(BREADME.jp
|
160
|
+
$B$K=q$+$l$F$$$^$9!#(B
|
161
|
+
|
162
|
+
$B8=:_$O@FF#(B $BEP$,(B maintainer $B$r>5$C$F$$$k$N$G!"Ld$$9g$o$;$O$3$A$i$NJ}$K(B
|
163
|
+
$B$*4j$$$7$^$9!#(B
|
164
|
+
|
165
|
+
- Author
|
166
|
+
|
167
|
+
$B$^$D$b$H(B $B$f$-$R$m(B <matz@ruby-lang.org>
|
168
|
+
Author of Ruby
|
169
|
+
|
170
|
+
$B$^$D$b$H(B $B$($$$8(B <usagi@ruby.club.or.jp>
|
171
|
+
One of users who loves Ruby
|
172
|
+
|
173
|
+
$B$3$N$U$?$j$O7;Do$G$O$"$j$^$;$s!#(B :-)
|
174
|
+
|
175
|
+
- Special Thanks
|
176
|
+
|
177
|
+
Guy Decoux ts <decoux@moulon.inra.fr>
|
178
|
+
|
179
|
+
- maintainer
|
180
|
+
|
181
|
+
$B@FF#(B $BEP(B <noborus@netlab.jp>
|
182
|
+
$B$^$D$b$H$G$J$/$F$9$$$^$;$s(B :-)
|
183
|
+
|