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

Commita71a80b

Browse files
committed
From: Jan Wieck <jwieck@debis.com>
A few minutes ago I sent down the PL/Tcl directory to this list. Look at it and reuse anything that might help to build PL/perl. I really hope that PL/perl and PL/Tcl appear in the 6.3 distribution. I'll do whatever I can to make this happen.
1 parent243a913 commita71a80b

File tree

6 files changed

+2755
-0
lines changed

6 files changed

+2755
-0
lines changed

‎src/pl/tcl/INSTALL

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
Installation instructions for PL/Tcl
2+
3+
1. Build the pltcl shared library
4+
5+
The Makefile for the pltcl shared library assumes the sources
6+
for PostgreSQL are in /usr/local/src/postgresql-6.2.1/src. Edit
7+
if not.
8+
9+
The Makefile depends on the tclConfig.sh file that get's installed
10+
with Tcl. This should either be in /usr/lib or in /usr/local/lib.
11+
If it is in a different place, edit mkMakefile.tcldefs or make a
12+
symbolic link to it here.
13+
14+
Type make and the shared library should get built.
15+
16+
2. Now create the PL/Tcl language in PostgreSQL
17+
18+
Since the pg_language system catalog is private to each database,
19+
the new language can be created only for individual databases,
20+
or in the template1 database. In the latter case, it is
21+
automatically available in all newly created databases.
22+
23+
The commands to create the new language are:
24+
25+
create function pltcl_call_handler () returns opaque
26+
as 'path-to-pltcl-shared-lib'
27+
language 'C';
28+
29+
create trusted procedural language 'pltcl'
30+
handler pltcl_call_handler
31+
lancompiler 'PL/Tcl';
32+
33+
The trusted keyword on create procedural language tells PostgreSQL,
34+
that all users (not only those with superuser privilege) are
35+
permitted to create functions with LANGUAGE 'pltcl'. This is
36+
absolutely safe, because there is nothing a normal user can do
37+
with PL/Tcl, to get around access restrictions he/she has.
38+
39+
3. Use PL/Tcl
40+
41+
Read pltcl_guide.txt to learn how to write functions and
42+
trigger procedures in PL/Tcl.
43+

‎src/pl/tcl/Makefile

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
#-------------------------------------------------------------------------
2+
#
3+
# Makefile
4+
# Makefile for the pltcl shared object
5+
#
6+
# IDENTIFICATION
7+
# $Header: /cvsroot/pgsql/src/pl/tcl/Makefile,v 1.1 1998/02/11 14:07:55 scrappy Exp $
8+
#
9+
#-------------------------------------------------------------------------
10+
11+
#
12+
# Tell make where the postgresql sources live
13+
#
14+
SRCDIR= ../../../src
15+
include$(SRCDIR)/Makefile.global
16+
17+
18+
#
19+
# Include definitions from the tclConfig.sh file
20+
#
21+
include Makefile.tcldefs
22+
23+
24+
#
25+
# Uncomment the following to force a specific version of the
26+
# Tcl shared library to be used.
27+
#
28+
#TCL_LIB_SPEC=-L/usr/lib -ltcl8.0
29+
30+
31+
#
32+
# Change following to how shared library that contain
33+
# correct references to libtcl must get built on your system.
34+
# Since these definitions come from the tclConfig.sh script,
35+
# they should work if the shared build of tcl was successful
36+
# on this system.
37+
#
38+
%$(TCL_SHLIB_SUFFIX):%.o
39+
$(TCL_SHLIB_LD) -o$@$<$(TCL_SHLIB_LD_LIBS)$(TCL_LIB_SPEC)$(TCL_LIBS)
40+
41+
42+
#
43+
# Uncomment the following to enable the unknown command lookup
44+
# on the first of all calls to the call handler. See the doc
45+
# in the modules directory about details.
46+
#
47+
#CFLAGS+= -DPLTCL_UNKNOWN_SUPPORT
48+
49+
50+
CC =$(TCL_CC)
51+
CFLAGS+= -I$(LIBPQDIR) -I$(SRCDIR)/include$(TCL_SHLIB_CFLAGS)
52+
53+
# For fmgr.h
54+
CFLAGS+= -I$(SRCDIR)/backend
55+
56+
CFLAGS+=$(TCL_DEFS)
57+
58+
LDADD+= -L$(LIBPQDIR) -lpq
59+
60+
#
61+
# DLOBJS is the dynamically-loaded object file.
62+
#
63+
DLOBJS= pltcl$(DLSUFFIX)
64+
65+
INFILES=$(DLOBJS)
66+
67+
#
68+
# plus exports files
69+
#
70+
ifdefEXPSUFF
71+
INFILES+=$(DLOBJS:.o=$(EXPSUFF))
72+
endif
73+
74+
#
75+
# Build the shared lib
76+
#
77+
all:$(INFILES)
78+
79+
Makefile.tcldefs:
80+
./mkMakefile.tcldefs
81+
82+
#
83+
# Clean
84+
#
85+
clean:
86+
rm -f$(INFILES)
87+
rm -f Makefile.tcldefs
88+
89+
install: all
90+
$(INSTALL)$(INSTL_LIB_OPTS)$(DLOBJS)$(DESTDIR)$(LIBDIR)/$(DLOBJS)
91+

‎src/pl/tcl/license.terms

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
This software is copyrighted by Jan Wieck - Hamburg.
2+
3+
The following terms apply to all files associated with the
4+
software unless explicitly disclaimed in individual files.
5+
6+
The author hereby grants permission to use, copy, modify,
7+
distribute, and license this software and its documentation
8+
for any purpose, provided that existing copyright notices are
9+
retained in all copies and that this notice is included
10+
verbatim in any distributions. No written agreement, license,
11+
or royalty fee is required for any of the authorized uses.
12+
Modifications to this software may be copyrighted by their
13+
author and need not follow the licensing terms described
14+
here, provided that the new terms are clearly indicated on
15+
the first page of each file where they apply.
16+
17+
IN NO EVENT SHALL THE AUTHOR OR DISTRIBUTORS BE LIABLE TO ANY
18+
PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR
19+
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS
20+
SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF, EVEN
21+
IF THE AUTHOR HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH
22+
DAMAGE.
23+
24+
THE AUTHOR AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY
25+
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
26+
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
27+
PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON
28+
AN "AS IS" BASIS, AND THE AUTHOR AND DISTRIBUTORS HAVE NO
29+
OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
30+
ENHANCEMENTS, OR MODIFICATIONS.

‎src/pl/tcl/mkMakefile.tcldefs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/sh
2+
if [-f ./tclConfig.sh ];then
3+
. ./tclConfig.sh
4+
else
5+
if [-f /usr/lib/tclConfig.sh ];then
6+
echo"using tclConfig.sh from /usr/lib"
7+
. /usr/lib/tclConfig.sh
8+
else
9+
if [-f /usr/local/lib/tclConfig.sh ];then
10+
echo"using tclConfig.sh from /usr/local/lib"
11+
. /usr/local/lib/tclConfig.sh
12+
else
13+
echo"tclConfig.sh not found in /usr/lib or /usr/local/lib"
14+
echo"I need this file! Please make a symbolic link to this file"
15+
echo"and start make again."
16+
exit 1
17+
fi
18+
fi
19+
fi
20+
21+
set| grep'^TCL'>Makefile.tcldefs
22+
exit 0

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp