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

Commit51cfdae

Browse files
committed
Hi,
here is an updated version of the bit type with a bugfix and all the necessarySQL functions defined. This should replace what is currently in contrib. I'dappreciate any comments on what is there.Kind regards,Adriaan
1 parent5454b37 commit51cfdae

File tree

10 files changed

+423
-132
lines changed

10 files changed

+423
-132
lines changed

‎contrib/bit/Makefile

Lines changed: 43 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,46 @@
1-
CFLAGS = -g
1+
ifndefPGDIR
2+
PGDIR= ../..
3+
PGDIR=/data/build/postgresql-7.0beta3
4+
endif
25

3-
varbit: vartest.o varbit.o
4-
$(CC)$(CFLAGS) -o$@$^
6+
SRCDIR=$(PGDIR)/src
57

6-
varbit.o: varbit.c varbit.h
7-
vartest.o: vartest.c varbit.h
8+
include$(SRCDIR)/Makefile.global
9+
10+
TARGETS= varbit.sql varbit$(DLSUFFIX)
11+
# vartest
12+
SOURCE= varbit.c varbit_glue.c
13+
OBJ=$(SOURCE:.c=.o)
14+
CFLAGS += -g
15+
16+
all:$(TARGETS)
17+
18+
varbit$(DLSUFFIX):$(OBJ)
19+
$(CC)$(CFLAGS) -shared -o varbit$(DLSUFFIX)$(SOURCE)$(CLIBS)
20+
21+
vartest: varbit.o vartest.o
22+
$(CC) -o$@ varbit.o vartest.o
23+
24+
install:
25+
$(MAKE) all
26+
cp -p varbit$(DLSUFFIX)$(LIBDIR)/contrib
27+
chmod 555$(LIBDIR)/contrib/varbit$(DLSUFFIX)
28+
29+
%.sql:%.source
30+
echo$(SRCDIR)
31+
if [-z"$$USER" ];then USER=$$LOGNAME;fi;\
32+
if [-z"$$USER" ];then USER=`whoami`;fi;\
33+
if [-z"$$USER" ];thenecho'Cannot deduce $$USER.';exit 1;fi;\
34+
rm -f$@;\
35+
C=`pwd`;\
36+
O=$C;\
37+
if [-d${LIBDIR}/contrib ];then O=${LIBDIR}/contrib;else \
38+
echo"contrib directory does not exist.";fi;\
39+
sed -e"s:_CWD_:$$C:g"\
40+
-e"s:_OBJWD_:$$O:g"\
41+
-e"s:_DLSUFFIX_:$(DLSUFFIX):g"\
42+
-e"s/_USER_/$$USER/g"<$<>$@
43+
44+
clean:
45+
rm -f$(TARGETS) varbit.o
846

9-
clean:
10-
rm -f*.o varbit

‎contrib/bit/README

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ make this code as independent as possible of the byte length, but it
77
is quite possible that there may be problems on machines that don't
88
have 8 bits/byte (are there still any around?).
99

10-
In the input routines I have assumed that the parser eats the quotes
11-
in B'...' or X'...'.
12-
1310
The SQL standard only defines comparison, SUBSTR and concatenation
1411
operators, and these have been implemented. In addition all logical
1512
operators have been implemented, i.e. ~,|,&,^,<< and >>. This is

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp