postgres 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/ChangeLog ADDED
@@ -0,0 +1,230 @@
1
+ Ruby extension library to access PostgreSQL.
2
+ ===========================================
3
+ Mon Jan 6 2003 version 0.7.1
4
+
5
+ * async_exec: remove check of PQisBusy.
6
+ patch supplied byd <m_seki@mva.biglobe.ne.jp>
7
+
8
+ Wed Oct 16 2002 version 0.7.0
9
+
10
+ * rename README.jp -> README.ja.
11
+
12
+ Thu Oct 10 2002
13
+
14
+ * get_notify: bug fix Deletes of unnecessary "free(notify);"
15
+ debian bug report.
16
+
17
+ Wed Oct 9 2002
18
+
19
+ * query: add pgresult_clear.
20
+ patch supplied by "Shirai,Kaoru" <shirai@p1jp.com>
21
+
22
+ Sat Sep 28 2002
23
+
24
+ * PGconn: add methods escape, quote, escape_bytes.
25
+ patch supplied by MoonWolf <moonwolf@moonwolf.com>
26
+
27
+ Tue Aug 20 2002
28
+
29
+ * extconf.rb add dir_config('postgres')
30
+ patch supplied by Nate Haggard <nate@wordplace.com>
31
+
32
+ Mon Jun 3 2002 version 0.7.0-pre2
33
+
34
+ * not to use fe_getauthname().
35
+ patch supplied by Neil Conway <nconway@klamath.dyndns.org>
36
+
37
+ Thu May 30 2002 version 0.7.0-pre1
38
+
39
+ * Fix to insert_table so that nil values in Ruby are inserted
40
+ back into the database as nulls.
41
+ patch supplied by Jeremy Henty <jeremy@chaos.org.uk>
42
+
43
+ * Fix to insert_table to protect characters that Postgres would
44
+ otherwise interpret specially.
45
+ patch supplied by Jeremy Henty <jeremy@chaos.org.uk>
46
+
47
+ Wed Apr 24 2002
48
+
49
+ * Removed unused variables.
50
+ * Improve notification code.
51
+ * Add a missing "return Qnil" statement in a function
52
+ declared to return VALUE.
53
+ * Fix an minor error in pgconn_loopen().
54
+ patch supplied by Neil Conway <nconway@klamath.dyndns.org>
55
+
56
+ Tue Mar 5 2002
57
+
58
+ * fix pglarge_write return.
59
+ patch supplied by Noboru Matui <silicon@mx1.freemail.ne.jp>
60
+
61
+ Mon Jan 7 2002
62
+
63
+ * refer to POSTGRES_INCLUDE and POSTGTRES_LIB
64
+ environmental variables.
65
+ patch supplied by Neil Conway <nconway@klamath.dyndns.org>
66
+
67
+ Sun Dec 16 2001
68
+
69
+ * add methods "getisnull".
70
+ patch supplied by Jeremy Henty <jeremy@chaos.org.uk>
71
+
72
+ Tue Nov 27 2001
73
+
74
+ * convert NULL => nil .
75
+ patch supplied by "Shirai,Kaoru" <shirai@p1jp.com>
76
+
77
+ Mon Nov 19 2001 version 0.6.5 released
78
+
79
+ * change my address.
80
+ Noboru Saitou <noborus@netlab.jp>
81
+
82
+ Fri Nov 16 2001
83
+
84
+ * default encoding set.
85
+ Riley <wormwood@speakeasy.org>
86
+
87
+ Fri Nov 16 2001
88
+
89
+ * add methods "cmdtuples"
90
+ Gabriel Emerson <gemerson@evalsoft.com>
91
+ Thanks to greentea@fa2.so-net.ne.jp
92
+
93
+ Thu Jul 12 2001
94
+
95
+ * psql.rb $OPT_p => $OPT_p.to_i (bug fix).
96
+ Yuta TSUBOI <yuuta-t@is.aist-nara.ac.jp>
97
+
98
+ Mon Apr 23 2001 version 0.6.4 released
99
+
100
+ * add include sys/types.h
101
+ patch supplied by "Akinori MUSHA" <knu@iDaemons.org>.
102
+
103
+ Sun Apr 22 2001 version 0.6.3 released
104
+
105
+ * document updated.
106
+
107
+ Sun Mar 18 2001
108
+
109
+ * extern -> EXTERN changed.
110
+ shibata <kshibata@vesta.ocn.ne.jp>
111
+
112
+ Sun Feb 11 2001
113
+
114
+ * add methods "async_exec" and "async_query.
115
+ patch supplied by Andy Yu <is@gnuchina.org>.
116
+
117
+ Tue Feb 6 2001 version 0.6.2 released
118
+
119
+ * extconf.rb have_func second argument omit.
120
+ (old ruby version support).
121
+
122
+ Mon Feb 5 2001
123
+
124
+ * RSTRING(*)->ptr -> STR2CSTR(*) changed.
125
+
126
+ Sun Feb 4 2001
127
+
128
+ * README and README.jp copying are unified to Ruby's.
129
+
130
+ Wed Jan 31 2001
131
+
132
+ * postgres.html bug fix and better.
133
+ patch supplied by Neil Conway <nconway@klamath.dyndns.org>.
134
+
135
+ * README bug fix and better.
136
+ patch supplied by Neil Conway <nconway@klamath.dyndns.org>.
137
+
138
+ Sat Jan 27 2001
139
+
140
+ * extconf.rb add error message for
141
+ Could not find PostgreSQL libraries.
142
+ patch supplied by Neil Conway <nconway@klamath.dyndns.org>.
143
+
144
+ Tue Jan 23 2001
145
+
146
+ * add methods "initialize".
147
+ patch supplied by <matz@zetabits.com>.
148
+
149
+ Sun Dec 17 2000
150
+
151
+ * 8192 byte limit removed.
152
+
153
+ Tue Oct 11 2000
154
+
155
+ * methods name lo* -> lo_* changed.
156
+
157
+ * extconf.rb bug fix.
158
+ have_func("PQsetClientEncoding")
159
+
160
+ Thu Jun 30 2000 version 0.6.1 released
161
+
162
+ * change receive parameter with VALUE.
163
+ (exec, insert_table, putline)
164
+
165
+ * insert_table: remove debug print.
166
+
167
+ * insert_table bug fix.
168
+ patch supplied by "Okada Jun" <yun@be-in.org>.
169
+
170
+ * extconf.rb ClientEncoding->SetClientEnocoding.
171
+
172
+ Sun May 21 2000 version 0.6.0 released
173
+
174
+ * change the maintainer with
175
+ Noboru Saitou <noborus@mb.kcom.ne.jp>.
176
+
177
+ * add provided clientEnocoding and setClientEncoding.
178
+
179
+ * replace rb_str_new with rb_tainted_str_new.
180
+ ts <decoux@moulon.inra.fr>
181
+
182
+ * add provided Large Object support!
183
+
184
+ * error message changed PQerrorMessage() use.
185
+
186
+ Fri Feb 25 2000 version 0.5.4 released
187
+
188
+ * PGError should be subclass of StandardError.
189
+
190
+ Fri Aug 6 1999 version 0.5.3 released
191
+
192
+ * use PQsetdbLogin() instead of PQsetdb().
193
+ patch supplied by <kasa@air.linkclub.or.jp>.
194
+
195
+ Tue Jul 30 1999 version 0.5.2 released
196
+
197
+ * document updated.
198
+ * better Ruby 1.3 support.
199
+
200
+ Tue Jul 13 1999 version 0.5.1 released
201
+
202
+ * modified for Ruby 1.3.x or later.
203
+
204
+ Wed Jan 20 1999 version 0.4.1 released
205
+
206
+ * Makefile.rb, extconf.rb: trivial bug fix.
207
+
208
+ Thu Dec 12 1997 version 0.4 released
209
+
210
+ * PGresult: add new method -- each{}, [] --
211
+ * provided Makefile.rb for ruby-1.1b
212
+
213
+ Thu Sep 25 1997 version 0.3.1 released
214
+
215
+ * extconf.rb bug fix.
216
+ * documentation about 'How to install'
217
+
218
+ Mon Sep 4 1997 version 0.3 released
219
+
220
+ * remove restrictions about japanese EUC characters.
221
+ * parseArgs related bug fix.
222
+
223
+ Mon Sep 2 1997 version 0.2 released
224
+
225
+ * provided psql.rb. (an interactive interface for PostgreSQL)
226
+ * some bug fixes.
227
+
228
+ Mon Aug 22 1997 version 0.1 released
229
+
230
+ * first release.
data/MANIFEST ADDED
@@ -0,0 +1,14 @@
1
+ MANIFEST
2
+ ChangeLog
3
+ postgres.c
4
+ extconf.rb
5
+ README
6
+ README.ja
7
+ doc/postgres.html
8
+ doc/postgres.jp.html
9
+ sample/psql.rb
10
+ sample/psqlHelp.rb
11
+ sample/test1.rb
12
+ sample/test2.rb
13
+ sample/test4.rb
14
+ sample/losample.rb
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
+