Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit27b8143

Browse files
committed
Hi,
I have updated my contrib code for version 6.5. In the attachment you willfind the directories array, datetime, miscutil, string, tools and userlockswhich replace the corresponding directories under contrib.In contrib/tools you will find some developement scripts which I use whilehacking the sources. I hope they will be useful for some other people.I have also added a contrib/Makefile which tries to compile and install allthe contribs. Unfortunately many of them don't have a Makefile or don'tcompile cleanly.--Massimo Dal Zotto
1 parent977108e commit27b8143

25 files changed

+536
-151
lines changed

‎contrib/Makefile

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Makefile for contrib code
2+
#
3+
# The following subdirs don't have a Makefile:
4+
#
5+
# apache_logging
6+
# linux
7+
# mSQL-interface
8+
# noupdate
9+
# unixdate
10+
#
11+
# The following subdirs give make errors:
12+
#
13+
# earthdistance
14+
# findoidjoins
15+
# isbn_issn
16+
# os2client
17+
# pginterface
18+
19+
all:
20+
fordirin*;do \
21+
if [-e$$dir/Makefile ];then \
22+
$(MAKE) -C$$dir;\
23+
fi;\
24+
done
25+
26+
install:
27+
fordirin*;do \
28+
if [-e$$dir/Makefile ];then \
29+
$(MAKE) -C$$dir$@;\
30+
fi;\
31+
done
32+
33+
clean:
34+
fordirin*;do \
35+
if [-e$$dir/Makefile ];then \
36+
$(MAKE) -C$$dir$@;\
37+
fi;\
38+
done||exit 0
39+
40+
distclean:
41+
fordirin*;do \
42+
if [-e$$dir/Makefile ];then \
43+
$(MAKE) -C$$dir$@;\
44+
fi;\
45+
done||exit 0

‎contrib/array/Makefile

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#-------------------------------------------------------------------------
22
#
3-
# Makefile--
4-
# Makefile for array iterator functions.
3+
# Makefile --
4+
#
5+
# Makefile for array iterator module.
56
#
67
#-------------------------------------------------------------------------
78

@@ -19,6 +20,8 @@ CFLAGS += $(INCLUDE_OPT) $(CFLAGS_SL)
1920

2021
MODNAME =array_iterator
2122

23+
SQLDEFS =$(MODNAME).sql
24+
2225
MODULE =$(MODNAME)$(DLSUFFIX)
2326

2427
MODDIR =$(LIBDIR)/modules
@@ -29,12 +32,12 @@ all:module sql
2932

3033
module:$(MODULE)
3134

32-
sql:$(MODNAME).sql
35+
sql:$(SQLDEFS)
3336

34-
install:$(MODULE)$(MODDIR)$(SQLDIR)
37+
install:$(MODULE)$(SQLDEFS)$(MODDIR)$(SQLDIR)
3538
cp -p$(MODULE)$(MODDIR)/
3639
strip$(MODDIR)/$(MODULE)
37-
cp -p$(MODNAME).sql$(SQLDIR)/
40+
cp -p$(SQLDEFS)$(SQLDIR)/
3841

3942
$(MODDIR):
4043
mkdir -p$@

‎contrib/array/array_iterator.c

Lines changed: 84 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ array_texteq(ArrayType *array, char *value)
141141
{
142142
returnarray_iterator((Oid)25,/* text */
143143
(Oid)67,/* texteq */
144-
0,/* logical or */
144+
0,/* logical or */
145145
array, (Datum)value);
146146
}
147147

@@ -150,7 +150,7 @@ array_all_texteq(ArrayType *array, char *value)
150150
{
151151
returnarray_iterator((Oid)25,/* text */
152152
(Oid)67,/* texteq */
153-
1,/* logical and */
153+
1,/* logical and */
154154
array, (Datum)value);
155155
}
156156

@@ -159,7 +159,7 @@ array_textregexeq(ArrayType *array, char *value)
159159
{
160160
returnarray_iterator((Oid)25,/* text */
161161
(Oid)1254,/* textregexeq */
162-
0,/* logical or */
162+
0,/* logical or */
163163
array, (Datum)value);
164164
}
165165

@@ -168,48 +168,89 @@ array_all_textregexeq(ArrayType *array, char *value)
168168
{
169169
returnarray_iterator((Oid)25,/* text */
170170
(Oid)1254,/* textregexeq */
171-
1,/* logical and */
171+
1,/* logical and */
172172
array, (Datum)value);
173173
}
174174

175175
/*
176-
* Iterator functions for type_char16. Note that the regexp
176+
* Iterator functions for type_varchar. Note that the regexp
177177
* operators take the second argument of type text.
178178
*/
179179

180180
int32
181-
array_char16eq(ArrayType*array,char*value)
181+
array_varchareq(ArrayType*array,char*value)
182182
{
183-
returnarray_iterator((Oid)20,/*char16 */
184-
(Oid)1275,/*char16eq */
185-
0,/* logical or */
183+
returnarray_iterator((Oid)20,/*varchar */
184+
(Oid)1070,/*varchareq */
185+
0,/* logical or */
186186
array, (Datum)value);
187187
}
188188

189189
int32
190-
array_all_char16eq(ArrayType*array,char*value)
190+
array_all_varchareq(ArrayType*array,char*value)
191191
{
192-
returnarray_iterator((Oid)20,/*char16 */
193-
(Oid)1275,/*char16eq */
194-
1,/* logical and */
192+
returnarray_iterator((Oid)20,/*varchar */
193+
(Oid)1070,/*varchareq */
194+
1,/* logical and */
195195
array, (Datum)value);
196196
}
197197

198198
int32
199-
array_char16regexeq(ArrayType*array,char*value)
199+
array_varcharregexeq(ArrayType*array,char*value)
200200
{
201-
returnarray_iterator((Oid)20,/* char16 */
202-
(Oid)1288,/* char16regexeq */
203-
0,/* logical or */
201+
returnarray_iterator((Oid)20,/* varchar */
202+
(Oid)1254,/* textregexeq */
203+
0,/* logical or */
204+
array, (Datum)value);
205+
}
206+
207+
int32
208+
array_all_varcharregexeq(ArrayType*array,char*value)
209+
{
210+
returnarray_iterator((Oid)20,/* varchar */
211+
(Oid)1254,/* textregexeq */
212+
1,/* logical and */
213+
array, (Datum)value);
214+
}
215+
216+
/*
217+
* Iterator functions for type _bpchar. Note that the regexp
218+
* operators take the second argument of type text.
219+
*/
220+
221+
int32
222+
array_bpchareq(ArrayType*array,char*value)
223+
{
224+
returnarray_iterator((Oid)20,/* bpchar */
225+
(Oid)1048,/* bpchareq */
226+
0,/* logical or */
227+
array, (Datum)value);
228+
}
229+
230+
int32
231+
array_all_bpchareq(ArrayType*array,char*value)
232+
{
233+
returnarray_iterator((Oid)20,/* bpchar */
234+
(Oid)1048,/* bpchareq */
235+
1,/* logical and */
236+
array, (Datum)value);
237+
}
238+
239+
int32
240+
array_bpcharregexeq(ArrayType*array,char*value)
241+
{
242+
returnarray_iterator((Oid)20,/* bpchar */
243+
(Oid)1254,/* textregexeq */
244+
0,/* logical or */
204245
array, (Datum)value);
205246
}
206247

207248
int32
208-
array_all_char16regexeq(ArrayType*array,char*value)
249+
array_all_bpcharregexeq(ArrayType*array,char*value)
209250
{
210-
returnarray_iterator((Oid)20,/*char16 */
211-
(Oid)1288,/*char16regexeq */
212-
1,/* logical and */
251+
returnarray_iterator((Oid)20,/*bpchar */
252+
(Oid)1254,/*textregexeq */
253+
1,/* logical and */
213254
array, (Datum)value);
214255
}
215256

@@ -222,7 +263,7 @@ array_int4eq(ArrayType *array, int4 value)
222263
{
223264
returnarray_iterator((Oid)23,/* int4 */
224265
(Oid)65,/* int4eq */
225-
0,/* logical or */
266+
0,/* logical or */
226267
array, (Datum)value);
227268
}
228269

@@ -231,7 +272,7 @@ array_all_int4eq(ArrayType *array, int4 value)
231272
{
232273
returnarray_iterator((Oid)23,/* int4 */
233274
(Oid)65,/* int4eq */
234-
1,/* logical and */
275+
1,/* logical and */
235276
array, (Datum)value);
236277
}
237278

@@ -240,7 +281,7 @@ array_int4ne(ArrayType *array, int4 value)
240281
{
241282
returnarray_iterator((Oid)23,/* int4 */
242283
(Oid)144,/* int4ne */
243-
0,/* logical or */
284+
0,/* logical or */
244285
array, (Datum)value);
245286
}
246287

@@ -249,7 +290,7 @@ array_all_int4ne(ArrayType *array, int4 value)
249290
{
250291
returnarray_iterator((Oid)23,/* int4 */
251292
(Oid)144,/* int4ne */
252-
1,/* logical and */
293+
1,/* logical and */
253294
array, (Datum)value);
254295
}
255296

@@ -258,7 +299,7 @@ array_int4gt(ArrayType *array, int4 value)
258299
{
259300
returnarray_iterator((Oid)23,/* int4 */
260301
(Oid)147,/* int4gt */
261-
0,/* logical or */
302+
0,/* logical or */
262303
array, (Datum)value);
263304
}
264305

@@ -267,7 +308,7 @@ array_all_int4gt(ArrayType *array, int4 value)
267308
{
268309
returnarray_iterator((Oid)23,/* int4 */
269310
(Oid)147,/* int4gt */
270-
1,/* logical and */
311+
1,/* logical and */
271312
array, (Datum)value);
272313
}
273314

@@ -276,7 +317,7 @@ array_int4ge(ArrayType *array, int4 value)
276317
{
277318
returnarray_iterator((Oid)23,/* int4 */
278319
(Oid)150,/* int4ge */
279-
0,/* logical or */
320+
0,/* logical or */
280321
array, (Datum)value);
281322
}
282323

@@ -285,7 +326,7 @@ array_all_int4ge(ArrayType *array, int4 value)
285326
{
286327
returnarray_iterator((Oid)23,/* int4 */
287328
(Oid)150,/* int4ge */
288-
1,/* logical and */
329+
1,/* logical and */
289330
array, (Datum)value);
290331
}
291332

@@ -294,7 +335,7 @@ array_int4lt(ArrayType *array, int4 value)
294335
{
295336
returnarray_iterator((Oid)23,/* int4 */
296337
(Oid)66,/* int4lt */
297-
0,/* logical or */
338+
0,/* logical or */
298339
array, (Datum)value);
299340
}
300341

@@ -303,7 +344,7 @@ array_all_int4lt(ArrayType *array, int4 value)
303344
{
304345
returnarray_iterator((Oid)23,/* int4 */
305346
(Oid)66,/* int4lt */
306-
1,/* logical and */
347+
1,/* logical and */
307348
array, (Datum)value);
308349
}
309350

@@ -312,7 +353,7 @@ array_int4le(ArrayType *array, int4 value)
312353
{
313354
returnarray_iterator((Oid)23,/* int4 */
314355
(Oid)149,/* int4le */
315-
0,/* logical or */
356+
0,/* logical or */
316357
array, (Datum)value);
317358
}
318359

@@ -321,19 +362,18 @@ array_all_int4le(ArrayType *array, int4 value)
321362
{
322363
returnarray_iterator((Oid)23,/* int4 */
323364
(Oid)149,/* int4le */
324-
1,/* logical and */
365+
1,/* logical and */
325366
array, (Datum)value);
326367
}
327368

328369
/* new tobias gabele 1999 */
329370

330-
331371
int32
332372
array_oideq(ArrayType*array,Oidvalue)
333373
{
334374
returnarray_iterator((Oid)26,/* oid */
335375
(Oid)184,/* oideq */
336-
0,/* logical or */
376+
0,/* logical or */
337377
array, (Datum)value);
338378
}
339379

@@ -342,14 +382,16 @@ array_all_oidne(ArrayType *array, Oid value)
342382
{
343383
returnarray_iterator((Oid)26,/* int4 */
344384
(Oid)185,/* oidne */
345-
1,/* logical and */
385+
1,/* logical and */
346386
array, (Datum)value);
347387
}
348388

349-
350-
351-
352-
353-
354-
355389
/* end of file */
390+
391+
/*
392+
* Local Variables:
393+
* tab-width: 4
394+
* c-indent-level: 4
395+
* c-basic-offset: 4
396+
* End:
397+
*/

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp