ruby-postgres 0.7.1.2005.11.24-mswin32

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,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
@@ -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/Makefile ADDED
@@ -0,0 +1,139 @@
1
+
2
+ SHELL = /bin/sh
3
+
4
+ #### Start of system configuration section. ####
5
+
6
+ srcdir = .
7
+ topdir = c:/mingwruby/lib/ruby/1.8/i386-mingw32
8
+ hdrdir = $(topdir)
9
+ VPATH = $(srcdir);$(topdir);$(hdrdir)
10
+
11
+ DESTDIR = c:
12
+ prefix = $(DESTDIR)/mingwruby
13
+ exec_prefix = $(DESTDIR)/mingwruby
14
+ sitedir = $(prefix)/lib/ruby/site_ruby
15
+ rubylibdir = $(libdir)/ruby/$(ruby_version)
16
+ archdir = $(rubylibdir)/$(arch)
17
+ sbindir = $(exec_prefix)/sbin
18
+ datadir = $(prefix)/share
19
+ includedir = $(prefix)/include
20
+ infodir = $(prefix)/info
21
+ sysconfdir = $(prefix)/etc
22
+ mandir = $(prefix)/man
23
+ libdir = $(DESTDIR)/mingwruby/lib
24
+ sharedstatedir = $(prefix)/com
25
+ oldincludedir = $(DESTDIR)/usr/include
26
+ sitearchdir = $(sitelibdir)/$(sitearch)
27
+ bindir = $(exec_prefix)/bin
28
+ localstatedir = $(prefix)/var
29
+ sitelibdir = $(sitedir)/$(ruby_version)
30
+ libexecdir = $(exec_prefix)/libexec
31
+
32
+ CC = gcc
33
+ LIBRUBY = lib$(LIBRUBY_SO).a
34
+ LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
35
+ LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME)
36
+ LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static
37
+
38
+ CFLAGS = -g -O2
39
+ CPPFLAGS = -I. -I$(topdir) -I$(hdrdir) -I$(srcdir) -DHAVE_LIBPQ_FE_H -DHAVE_LIBPQ_LIBPQ_FS_H -DHAVE_PQSETCLIENTENCODING -DHAVE_PG_ENCODING_TO_CHAR -DHAVE_PQFREEMEM -DHAVE_PQESCAPESTRING -DHAVE_PQEXECPARAMS -Ic:/apps/POSTGR~1/8.1/include
40
+ CXXFLAGS = $(CFLAGS)
41
+ DLDFLAGS = -Wl,--enable-auto-import,--export-all
42
+ LDSHARED = gcc -shared -s
43
+ AR = ar
44
+ EXEEXT = .exe
45
+
46
+ RUBY_INSTALL_NAME = ruby
47
+ RUBY_SO_NAME = msvcrt-ruby18
48
+ arch = i386-mingw32
49
+ sitearch = i386-msvcrt
50
+ ruby_version = 1.8
51
+ ruby = c:/mingwruby/bin/ruby
52
+ RUBY = $(ruby)
53
+ RM = rm -f
54
+ MAKEDIRS = mkdir -p
55
+ INSTALL = /bin/install -c
56
+ INSTALL_PROG = $(INSTALL) -m 0755
57
+ INSTALL_DATA = $(INSTALL) -m 644
58
+ COPY = cp
59
+
60
+ #### End of system configuration section. ####
61
+
62
+ preload =
63
+
64
+ libpath = c:/apps/POSTGR~1/8.1/lib $(libdir)
65
+ LIBPATH = -L"c:/apps/POSTGR~1/8.1/lib" -L"$(libdir)"
66
+ DEFFILE =
67
+
68
+ CLEANFILES =
69
+ DISTCLEANFILES =
70
+
71
+ extout =
72
+ extout_prefix =
73
+ target_prefix =
74
+ LOCAL_LIBS =
75
+ LIBS = $(LIBRUBYARG_SHARED) -lpq -lwsock32
76
+ SRCS = postgres.c
77
+ OBJS = postgres.o
78
+ TARGET = postgres
79
+ DLLIB = $(TARGET).so
80
+ STATIC_LIB =
81
+
82
+ RUBYCOMMONDIR = $(sitedir)$(target_prefix)
83
+ RUBYLIBDIR = $(sitelibdir)$(target_prefix)
84
+ RUBYARCHDIR = $(sitearchdir)$(target_prefix)
85
+
86
+ TARGET_SO = $(DLLIB)
87
+ CLEANLIBS = $(TARGET).so $(TARGET).il? $(TARGET).tds $(TARGET).map
88
+ CLEANOBJS = *.o *.a *.s[ol] *.pdb *.exp *.bak
89
+
90
+ all: $(DLLIB)
91
+ static: $(STATIC_LIB)
92
+
93
+ clean:
94
+ @-$(RM) $(CLEANLIBS:/=\) $(CLEANOBJS:/=\) $(CLEANFILES:/=\)
95
+
96
+ distclean: clean
97
+ @-$(RM) Makefile extconf.h conftest.* mkmf.log
98
+ @-$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES:/=\)
99
+
100
+ realclean: distclean
101
+ install: install-so install-rb
102
+
103
+ install-so: $(RUBYARCHDIR)
104
+ install-so: $(RUBYARCHDIR)/$(DLLIB)
105
+ $(RUBYARCHDIR)/$(DLLIB): $(DLLIB)
106
+ $(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
107
+ install-rb: pre-install-rb install-rb-default
108
+ install-rb-default: pre-install-rb-default
109
+ pre-install-rb pre-install-rb-default: $(RUBYLIBDIR)
110
+ $(RUBYARCHDIR):
111
+ $(MAKEDIRS) $@
112
+ $(RUBYLIBDIR):
113
+ $(MAKEDIRS) $@
114
+
115
+ site-install: site-install-so site-install-rb
116
+ site-install-so: install-so
117
+ site-install-rb: install-rb
118
+
119
+ .SUFFIXES: .c .m .cc .cxx .cpp .o
120
+
121
+ .cc.o:
122
+ $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $<
123
+
124
+ .cxx.o:
125
+ $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $<
126
+
127
+ .cpp.o:
128
+ $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $<
129
+
130
+ .c.o:
131
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c $<
132
+
133
+ $(DLLIB): $(OBJS)
134
+ @-$(RM) $@
135
+ $(LDSHARED) $(DLDFLAGS) $(LIBPATH) -o $@ $(OBJS) $(LOCAL_LIBS) $(LIBS)
136
+
137
+
138
+
139
+ $(OBJS): ruby.h defines.h
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
+