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

Commit623453a

Browse files
committed
Make createlang use dynamic loader enhancements (automatic path and suffix).
1 parent0995a51 commit623453a

File tree

2 files changed

+5
-28
lines changed

2 files changed

+5
-28
lines changed

‎src/bin/scripts/Makefile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
66
# Portions Copyright (c) 1994, Regents of the University of California
77
#
8-
# $Header: /cvsroot/pgsql/src/bin/scripts/Makefile,v 1.12 2001/02/18 18:34:01 momjian Exp $
8+
# $Header: /cvsroot/pgsql/src/bin/scripts/Makefile,v 1.13 2001/05/23 22:00:43 petere Exp $
99
#
1010
#-------------------------------------------------------------------------
1111

@@ -18,9 +18,7 @@ SCRIPTS := createdb dropdb createuser dropuser createlang droplang vacuumdb
1818
all:$(SCRIPTS)
1919

2020
createlang: createlang.sh
21-
sed -e's/@DLSUFFIX@/$(DLSUFFIX)/g'\
22-
-e's,@libdir@,$(libdir),g'\
23-
$<>$@
21+
cp$<$@
2422
chmod a+x$@
2523

2624
install: all installdirs

‎src/bin/scripts/createlang.sh

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
88
# Portions Copyright (c) 1994, Regents of the University of California
99
#
10-
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createlang.sh,v 1.25 2001/05/12 01:30:30 petere Exp $
10+
# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createlang.sh,v 1.26 2001/05/23 22:00:43 petere Exp $
1111
#
1212
#-------------------------------------------------------------------------
1313

@@ -170,7 +170,7 @@ fi
170170
# Check that we have PGLIB
171171
# ----------
172172
if [-z"$PGLIB" ];then
173-
PGLIB='@libdir@'
173+
PGLIB='$libdir'
174174
fi
175175

176176
# ----------
@@ -222,27 +222,6 @@ case "$langname" in
222222
;;
223223
esac
224224

225-
DLSUFFIX='@DLSUFFIX@'
226-
227-
# ----------
228-
# Check that the shared object for the call handler is installed
229-
# in PGLIB
230-
# ----------
231-
if [!-f"$PGLIB/$object$DLSUFFIX" ];then
232-
(
233-
echo"$CMDNAME: cannot find the file '$PGLIB/$langname$DLSUFFIX'"
234-
echo""
235-
echo"This file contains the call handler for$lancomp. By default,"
236-
echo"only PL/pgSQL is built and installed; other languages must be"
237-
echo"explicitly enabled at configure time."
238-
echo""
239-
echo"To install PL/Tcl, make sure the option --with-tcl is given to"
240-
echo"configure, then recompile and install. To install PL/Perl use"
241-
echo"--with-perl."
242-
)1>&2
243-
exit 1
244-
fi
245-
246225

247226
PSQL="${PATHNAME}psql -A -t -q$PSQLOPT -d$dbname -c"
248227

@@ -280,7 +259,7 @@ fi
280259
# ----------
281260
# Create the call handler and the language
282261
# ----------
283-
sqlcmd="CREATE FUNCTION$handler () RETURNS OPAQUE AS '$PGLIB/${object}$DLSUFFIX' LANGUAGE 'C';"
262+
sqlcmd="CREATE FUNCTION$handler () RETURNS OPAQUE AS '$PGLIB/${object}' LANGUAGE 'C';"
284263
if ["$showsql"= yes ];then
285264
echo"$sqlcmd"
286265
fi

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp