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

Commit8dcf998

Browse files
committed
Remove no-longer-needed dependencies on DLSUFFIX.
1 parent62651c0 commit8dcf998

File tree

4 files changed

+24
-40
lines changed

4 files changed

+24
-40
lines changed

‎src/tutorial/Makefile

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Makefile for tutorial
55
#
66
# IDENTIFICATION
7-
# $Header: /cvsroot/pgsql/src/tutorial/Makefile,v 1.13 2001/08/09 13:52:06 tgl Exp $
7+
# $Header: /cvsroot/pgsql/src/tutorial/Makefile,v 1.14 2001/10/26 20:45:33 tgl Exp $
88
#
99
#-------------------------------------------------------------------------
1010

@@ -16,7 +16,7 @@ override CFLAGS+= $(CFLAGS_SL)
1616
overrideDLLLIBS :=$(BE_DLLLIBS)$(DLLLIBS)
1717

1818
#
19-
# DLOBJSis the dynamically-loaded object files. The "funcs" queries
19+
# DLOBJSare the dynamically-loaded object files. The "funcs" queries
2020
# include CREATE FUNCTIONs that load routines from these files.
2121
#
2222
DLOBJS= complex$(DLSUFFIX) funcs$(DLSUFFIX)
@@ -26,15 +26,9 @@ QUERIES= advanced.sql basics.sql complex.sql funcs.sql syscat.sql
2626
all:$(DLOBJS)$(QUERIES)
2727

2828
%.sql:%.source
29-
if [-z"$$USER" ];then USER=$$LOGNAME;fi;\
30-
if [-z"$$USER" ];then USER=`whoami`;fi;\
31-
if [-z"$$USER" ];thenecho'Cannot deduce $$USER.';exit 1;fi;\
3229
rm -f$@;\
3330
C=`pwd`;\
34-
sed -e"s:_CWD_:$$C:g"\
35-
-e"s:_OBJWD_:$$C:g"\
36-
-e"s:_DLSUFFIX_:$(DLSUFFIX):g"\
37-
-e"s/_USER_/$$USER/g"<$<>$@
31+
sed -e"s:_OBJWD_:$$C:g"<$<>$@
3832

3933
clean:
4034
rm -f$(DLOBJS)$(QUERIES)

‎src/tutorial/README

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,11 @@
11
This directory contains SQL tutorial scripts. To look at them, first do a
22
% make
33
to compile all the scripts and C files for the user-defined functions
4-
and types. (make needs to be GNU makeand may be named something
5-
different on your system)
4+
and types. (make needs to be GNU make--- it may be named something
5+
different on your system, often gmake)
66

7-
Then, run psql with the -s flag:
7+
Then, run psql with the -s(single-step)flag:
88
% psql -s
99

10-
Welcome to the POSTGRESQL interactive sql monitor:
11-
Please read the file COPYRIGHT for copyright terms of POSTGRESQL
12-
13-
type \? for help on slash commands
14-
type \q to quit
15-
type \g or terminate with semicolon to execute query
16-
You are currently connected to the database: jolly
17-
18-
jolly==>
19-
2010
From within psql, you can try each individual script file by using
21-
the \i <filename> psql command.
22-
11+
psql's \i <filename> command.

‎src/tutorial/complex.source

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
--
88
-- Copyright (c) 1994, Regents of the University of California
99
--
10-
-- $Id: complex.source,v 1.10 2001/10/03 20:54:22 tgl Exp $
10+
-- $Id: complex.source,v 1.11 2001/10/26 20:45:33 tgl Exp $
1111
--
1212
---------------------------------------------------------------------------
1313

@@ -18,7 +18,8 @@
1818
--called 'complex' which represents complex numbers.
1919
-----------------------------
2020

21-
-- Assume the user defined functions are in _OBJWD_/complex_DLSUFFIX_
21+
-- Assume the user defined functions are in _OBJWD_/complex$DLSUFFIX
22+
-- (we do not want to assume this is in the dynamic loader search path)
2223
-- Look at $PWD/complex.c for the source.
2324

2425
-- the input function 'complex_in' takes a null-terminated string (the
@@ -28,15 +29,15 @@
2829

2930
CREATE FUNCTION complex_in(opaque)
3031
RETURNS complex
31-
AS '_OBJWD_/complex_DLSUFFIX_'
32+
AS '_OBJWD_/complex'
3233
LANGUAGE 'c';
3334

3435
-- the output function 'complex_out' takes the internal representation and
3536
-- converts it into the textual representation.
3637

3738
CREATE FUNCTION complex_out(opaque)
3839
RETURNS opaque
39-
AS '_OBJWD_/complex_DLSUFFIX_'
40+
AS '_OBJWD_/complex'
4041
LANGUAGE 'c';
4142

4243
-- now, we can create the type. The internallength specifies the size of the
@@ -80,7 +81,7 @@ SELECT * FROM test_complex;
8081
-- first, define a function complex_add (also in complex.c)
8182
CREATE FUNCTION complex_add(complex, complex)
8283
RETURNS complex
83-
AS '_OBJWD_/complex_DLSUFFIX_'
84+
AS '_OBJWD_/complex'
8485
LANGUAGE 'c';
8586

8687
-- we can now define the operator. We show a binary operator here but you
@@ -138,15 +139,15 @@ SELECT 'READ ABOVE!' AS STOP;
138139

139140
-- first, define the required operators
140141
CREATE FUNCTION complex_abs_lt(complex, complex) RETURNS bool
141-
AS '_OBJWD_/complex_DLSUFFIX_' LANGUAGE 'c';
142+
AS '_OBJWD_/complex' LANGUAGE 'c';
142143
CREATE FUNCTION complex_abs_le(complex, complex) RETURNS bool
143-
AS '_OBJWD_/complex_DLSUFFIX_' LANGUAGE 'c';
144+
AS '_OBJWD_/complex' LANGUAGE 'c';
144145
CREATE FUNCTION complex_abs_eq(complex, complex) RETURNS bool
145-
AS '_OBJWD_/complex_DLSUFFIX_' LANGUAGE 'c';
146+
AS '_OBJWD_/complex' LANGUAGE 'c';
146147
CREATE FUNCTION complex_abs_ge(complex, complex) RETURNS bool
147-
AS '_OBJWD_/complex_DLSUFFIX_' LANGUAGE 'c';
148+
AS '_OBJWD_/complex' LANGUAGE 'c';
148149
CREATE FUNCTION complex_abs_gt(complex, complex) RETURNS bool
149-
AS '_OBJWD_/complex_DLSUFFIX_' LANGUAGE 'c';
150+
AS '_OBJWD_/complex' LANGUAGE 'c';
150151

151152
CREATE OPERATOR < (
152153
leftarg = complex, rightarg = complex, procedure = complex_abs_lt,
@@ -231,7 +232,7 @@ INSERT INTO pg_amop (amopclaid, amopstrategy, amopreqcheck, amopopr)
231232

232233
--
233234
CREATE FUNCTION complex_abs_cmp(complex, complex) RETURNS int4
234-
AS '_OBJWD_/complex_DLSUFFIX_' LANGUAGE 'c';
235+
AS '_OBJWD_/complex' LANGUAGE 'c';
235236

236237
SELECT oid, proname FROM pg_proc WHERE proname = 'complex_abs_cmp';
237238

‎src/tutorial/funcs.source

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
--
77
-- Copyright (c) 1994-5, Regents of the University of California
88
--
9-
-- $Id: funcs.source,v 1.4 2000/03/28 02:49:19 tgl Exp $
9+
-- $Id: funcs.source,v 1.5 2001/10/26 20:45:33 tgl Exp $
1010
--
1111
---------------------------------------------------------------------------
1212

@@ -126,16 +126,16 @@ SELECT name(high_pay()) AS overpaid;
126126
-----------------------------
127127

128128
CREATE FUNCTION add_one(int4) RETURNS int4
129-
AS '_OBJWD_/funcs_DLSUFFIX_' LANGUAGE 'c';
129+
AS '_OBJWD_/funcs' LANGUAGE 'c';
130130

131131
CREATE FUNCTION makepoint(point, point) RETURNS point
132-
AS '_OBJWD_/funcs_DLSUFFIX_' LANGUAGE 'c';
132+
AS '_OBJWD_/funcs' LANGUAGE 'c';
133133

134134
CREATE FUNCTION copytext(text) RETURNS text
135-
AS '_OBJWD_/funcs_DLSUFFIX_' LANGUAGE 'c';
135+
AS '_OBJWD_/funcs' LANGUAGE 'c';
136136

137137
CREATE FUNCTION c_overpaid(EMP, int4) RETURNS bool
138-
AS '_OBJWD_/funcs_DLSUFFIX_' LANGUAGE 'c';
138+
AS '_OBJWD_/funcs' LANGUAGE 'c';
139139

140140
SELECT add_one(3) AS four;
141141

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp