Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
5e19e14e
Commit
5e19e14e
authored
May 11, 2001
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanups of pltcl unknown thingy.
parent
7a76e29b
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
471 additions
and
455 deletions
+471
-455
configure
configure
+390
-384
configure.in
configure.in
+15
-10
src/include/config.h.in
src/include/config.h.in
+4
-1
src/pl/tcl/Makefile
src/pl/tcl/Makefile
+19
-42
src/pl/tcl/modules/Makefile
src/pl/tcl/modules/Makefile
+28
-0
src/pl/tcl/modules/pltcl_delmod.in
src/pl/tcl/modules/pltcl_delmod.in
+2
-3
src/pl/tcl/modules/pltcl_listmod.in
src/pl/tcl/modules/pltcl_listmod.in
+2
-3
src/pl/tcl/modules/pltcl_loadmod.in
src/pl/tcl/modules/pltcl_loadmod.in
+2
-4
src/pl/tcl/pltcl.c
src/pl/tcl/pltcl.c
+9
-8
No files found.
configure
View file @
5e19e14e
This source diff could not be displayed because it is too large. You can
view the blob
instead.
configure.in
View file @
5e19e14e
...
@@ -359,16 +359,6 @@ PGAC_ARG_BOOL(with, tcl, no, [ --with-tcl build Tcl and Tk interfa
...
@@ -359,16 +359,6 @@ PGAC_ARG_BOOL(with, tcl, no, [ --with-tcl build Tcl and Tk interfa
AC_MSG_RESULT([$with_tcl])
AC_MSG_RESULT([$with_tcl])
AC_SUBST([with_tcl])
AC_SUBST([with_tcl])
# If Tcl is enabled (above) then check for pltcl_unknown_support
AC_MSG_CHECKING([whether to build with pl/tcl unknown support])
if test "$with_tcl" = yes; then
PGAC_ARG_BOOL(with, pltcl_unknown, no, [ --enable-pltcl-unknown build pl/tcl unknown support if Tcl is enabled])
else
enable_pltcl_unknown=no
fi
AC_MSG_RESULT([$enable_pltcl_unknown])
AC_SUBST([enable_pltcl_unknown])
# If Tcl is enabled (above) then Tk is also, unless the user disables it using --without-tk
# If Tcl is enabled (above) then Tk is also, unless the user disables it using --without-tk
AC_MSG_CHECKING([whether to build with Tk])
AC_MSG_CHECKING([whether to build with Tk])
if test "$with_tcl" = yes; then
if test "$with_tcl" = yes; then
...
@@ -391,6 +381,21 @@ PGAC_ARG_REQ(with, tclconfig, [ --with-tclconfig=DIR tclConfig.sh and tkConf
...
@@ -391,6 +381,21 @@ PGAC_ARG_REQ(with, tclconfig, [ --with-tclconfig=DIR tclConfig.sh and tkConf
PGAC_ARG_REQ(with, tkconfig, [ --with-tkconfig=DIR tkConfig.sh is in DIR])
PGAC_ARG_REQ(with, tkconfig, [ --with-tkconfig=DIR tkConfig.sh is in DIR])
#
# If Tcl is enabled (above) then check for pltcl_unknown_support
#
AC_MSG_CHECKING([whether to build with PL/Tcl unknown support])
if test "$with_tcl" = yes; then
PGAC_ARG_BOOL(enable, pltcl-unknown, no,
[ --enable-pltcl-unknown build PL/Tcl unknown support (if Tcl is enabled)],
[AC_DEFINE([ENABLE_PLTCL_UNKNOWN])])
else
enable_pltcl_unknown=no
fi
AC_MSG_RESULT([$enable_pltcl_unknown])
AC_SUBST([enable_pltcl_unknown])
#
#
# Optionally build Perl modules (Pg.pm and PL/Perl)
# Optionally build Perl modules (Pg.pm and PL/Perl)
#
#
...
...
src/include/config.h.in
View file @
5e19e14e
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
* or in config.h afterwards. Of course, if you edit config.h, then your
* or in config.h afterwards. Of course, if you edit config.h, then your
* changes will be overwritten the next time you run configure.
* changes will be overwritten the next time you run configure.
*
*
* $Id: config.h.in,v 1.16
3 2001/05/07 00:43:25 tgl
Exp $
* $Id: config.h.in,v 1.16
4 2001/05/11 23:38:06 petere
Exp $
*/
*/
#ifndef CONFIG_H
#ifndef CONFIG_H
...
@@ -81,6 +81,9 @@
...
@@ -81,6 +81,9 @@
*/
*/
#undef DEF_MAXBACKENDS
#undef DEF_MAXBACKENDS
/* --enable-pltcl-unknown */
#undef ENABLE_PLTCL_UNKNOWN
/*
/*
*------------------------------------------------------------------------
*------------------------------------------------------------------------
...
...
src/pl/tcl/Makefile
View file @
5e19e14e
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
#
#
# Makefile for the pltcl shared object
# Makefile for the pltcl shared object
#
#
# $Header: /cvsroot/pgsql/src/pl/tcl/Makefile,v 1.3
2 2001/05/09 21:42:29 momjian
Exp $
# $Header: /cvsroot/pgsql/src/pl/tcl/Makefile,v 1.3
3 2001/05/11 23:38:06 petere
Exp $
#
#
#-------------------------------------------------------------------------
#-------------------------------------------------------------------------
...
@@ -66,17 +66,6 @@ override CPPFLAGS += $(TCL_DEFS)
...
@@ -66,17 +66,6 @@ override CPPFLAGS += $(TCL_DEFS)
override
CFLAGS
=
$(TCL_CFLAGS_OPTIMIZE)
$(TCL_SHLIB_CFLAGS)
override
CFLAGS
=
$(TCL_CFLAGS_OPTIMIZE)
$(TCL_SHLIB_CFLAGS)
# Uncomment the following to enable the unknown command lookup on the
# first of all calls to the call handler. See the doc in the modules
# directory about details.
ifeq
($(enable_pltcl_unknown), yes)
override
CPPFLAGS
+=
-DPLTCL_UNKNOWN_SUPPORT
TCL_UNKNOWN_MODS
=
modules/pltcl_loadmod
\
modules/pltcl_delmod
\
modules/pltcl_listmod
endif
#
#
# DLOBJS is the dynamically-loaded object file.
# DLOBJS is the dynamically-loaded object file.
#
#
...
@@ -96,57 +85,45 @@ endif
...
@@ -96,57 +85,45 @@ endif
ifeq
($(TCL_SHARED_BUILD), 1)
ifeq
($(TCL_SHARED_BUILD), 1)
all
:
$(INFILES) $(TCL_UNKNOWN_MODS)
all
:
$(INFILES)
ifeq
($(enable_pltcl_unknown), yes)
modules/pltcl_loadmod
:
modules/pltcl_loadmod.in
\
$(MAKE)
-C
modules
$@
$(top_builddir)/src/Makefile.global
endif
sed
-e
's,@TCLSH@,
$(TCLSH)
,g'
\
$<
>
$@
chmod
a+x
$@
modules/pltcl_delmod
:
modules/pltcl_delmod.in
\
$(top_builddir)/src/Makefile.global
sed
-e
's,@TCLSH@,
$(TCLSH)
,g'
\
$<
>
$@
chmod
a+x
$@
modules/pltcl_listmod
:
modules/pltcl_listmod.in
\
$(top_builddir)/src/Makefile.global
sed
-e
's,@TCLSH@,
$(TCLSH)
,g'
\
$<
>
$@
chmod
a+x
$@
pltcl$(DLSUFFIX)
:
pltcl.o
pltcl$(DLSUFFIX)
:
pltcl.o
install
:
all installdirs
install
:
all installdirs
$(INSTALL_SHLIB)
$(DLOBJS)
$(DESTDIR)$(libdir)
/
$(DLOBJS)
$(INSTALL_SHLIB)
$(DLOBJS)
$(DESTDIR)$(libdir)
/
$(DLOBJS)
ifeq
($(enable_pltcl_unknown), yes)
ifeq
($(enable_pltcl_unknown), yes)
$(INSTALL_SCRIPT)
modules/pltcl_loadmod
\
$(MAKE)
-C
modules
$@
$(DESTDIR)$(bindir)
/pltcl_loadmod
$(INSTALL_SCRIPT)
modules/pltcl_delmod
\
$(DESTDIR)$(bindir)
/pltcl_delmod
$(INSTALL_SCRIPT)
modules/pltcl_listmod
\
$(DESTDIR)$(bindir)
/pltcl_listmod
$(INSTALL_DATA)
modules/unknown.pltcl
\
$(DESTDIR)$(datadir)
/unknown.pltcl
endif
endif
installdirs
:
installdirs
:
$(mkinstalldirs)
$(DESTDIR)$(libdir)
$(mkinstalldirs)
$(DESTDIR)$(libdir)
ifeq
($(enable_pltcl_unknown), yes)
$(MAKE)
-C
modules
$@
endif
uninstall
:
uninstall
:
rm
-f
$(DESTDIR)$(libdir)
/
$(DLOBJS)
rm
-f
$(DESTDIR)$(libdir)
/
$(DLOBJS)
ifeq
($(enable_pltcl_unknown), yes)
$(MAKE)
-C
modules
$@
endif
else
else
# TCL_SHARED_BUILD = 0
all install
:
all install
:
@
echo
"*****"
;
\
@
echo
"*****"
;
\
echo
"* Cannot build pltcl because Tcl is not a shared library; skipping it."
;
\
echo
"* Cannot build pltcl because Tcl is not a shared library; skipping it."
;
\
echo
"*****"
echo
"*****"
endif
endif
# TCL_SHARED_BUILD = 0
Makefile.tcldefs
:
mkMakefile.tcldefs.sh
Makefile.tcldefs
:
mkMakefile.tcldefs.sh
$(SHELL)
$<
'
$(TCL_CONFIG_SH)
'
'$@'
$(SHELL)
$<
'
$(TCL_CONFIG_SH)
'
'$@'
clean distclean maintainer-clean
:
clean distclean maintainer-clean
:
rm
-f
$(INFILES)
pltcl.o Makefile.tcldefs modules/pltcl_listmod modules/pltcl_loadmod modules/pltcl_delmod
rm
-f
$(INFILES)
pltcl.o Makefile.tcldefs
ifeq
($(enable_pltcl_unknown), yes)
$(MAKE)
-C
modules
$@
endif
src/pl/tcl/modules/Makefile
0 → 100644
View file @
5e19e14e
# $Header: /cvsroot/pgsql/src/pl/tcl/modules/Makefile,v 1.1 2001/05/11 23:38:06 petere Exp $
subdir
=
src/pl/tcl/modules
top_builddir
=
../../../..
include
$(top_builddir)/src/Makefile.global
MODULES
=
pltcl_loadmod pltcl_delmod pltcl_listmod
all
:
$(MODULES)
$(MODULES)
:
%: %.in $(top_builddir)/src/Makefile.global
sed
's,@TCLSH@,
$(TCLSH)
,g'
$<
>
$@
chmod
a+x
$@
install
:
all installdirs
$(INSTALL_SCRIPT)
pltcl_loadmod
$(DESTDIR)$(bindir)
/pltcl_loadmod
$(INSTALL_SCRIPT)
pltcl_delmod
$(DESTDIR)$(bindir)
/pltcl_delmod
$(INSTALL_SCRIPT)
pltcl_listmod
$(DESTDIR)$(bindir)
/pltcl_listmod
$(INSTALL_DATA)
unknown.pltcl
$(DESTDIR)$(datadir)
/unknown.pltcl
installdirs
:
$(mkinstalldirs)
$(DESTDIR)$(bindir)
$(DESTDIR)$(datadir)
uninstall
:
rm
-f
$(DESTDIR)$(bindir)
/pltcl_loadmod
$(DESTDIR)$(bindir)
/pltcl_delmod
$(DESTDIR)$(bindir)
/pltcl_listmod
$(DESTDIR)$(datadir)
/unknown.pltcl
clean distclean maintainer-clean
:
rm
-f
$(MODULES)
src/pl/tcl/modules/pltcl_delmod.in
View file @
5e19e14e
#
!/bin/sh
#
!
/bin/sh
#
Start
tclsh
\
#
Start
tclsh
\
exec
@
TCLSH
@
"$0"
$@
exec
@
TCLSH
@
"$0"
"$@"
#
#
#
Code
still
has
to
be
documented
#
Code
still
has
to
be
documented
...
@@ -113,4 +113,3 @@ while {$i < $argc} {
...
@@ -113,4 +113,3 @@ while {$i < $argc} {
}
}
pg_disconnect $conn
pg_disconnect $conn
src/pl/tcl/modules/pltcl_listmod.in
View file @
5e19e14e
#
!/bin/sh
#
!
/bin/sh
#
Start
tclsh
\
#
Start
tclsh
\
exec
@
TCLSH
@
"$0"
$@
exec
@
TCLSH
@
"$0"
"$@"
#
#
#
Code
still
has
to
be
documented
#
Code
still
has
to
be
documented
...
@@ -119,4 +119,3 @@ if {$i == $argc} {
...
@@ -119,4 +119,3 @@ if {$i == $argc} {
}
}
pg_disconnect $conn
pg_disconnect $conn
src/pl/tcl/modules/pltcl_loadmod.in
View file @
5e19e14e
#
!/bin/sh
#
!
/bin/sh
#
Start
tclsh
\
#
Start
tclsh
\
exec
@
TCLSH
@
"$0"
$@
exec
@
TCLSH
@
"$0"
"$@"
#
#
#
Code
still
has
to
be
documented
#
Code
still
has
to
be
documented
...
@@ -499,5 +499,3 @@ __PLTcl_loadmod_load_modules $__PLTcl_loadmod_conn
...
@@ -499,5 +499,3 @@ __PLTcl_loadmod_load_modules $__PLTcl_loadmod_conn
pg_disconnect $__PLTcl_loadmod_conn
pg_disconnect $__PLTcl_loadmod_conn
puts ""
puts ""
src/pl/tcl/pltcl.c
View file @
5e19e14e
...
@@ -31,10 +31,12 @@
...
@@ -31,10 +31,12 @@
* ENHANCEMENTS, OR MODIFICATIONS.
* ENHANCEMENTS, OR MODIFICATIONS.
*
*
* IDENTIFICATION
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/pl/tcl/pltcl.c,v 1.3
4 2001/03/22 04:01:42 momjian
Exp $
* $Header: /cvsroot/pgsql/src/pl/tcl/pltcl.c,v 1.3
5 2001/05/11 23:38:06 petere
Exp $
*
*
**********************************************************************/
**********************************************************************/
#include "postgres.h"
#include <tcl.h>
#include <tcl.h>
#include <stdio.h>
#include <stdio.h>
...
@@ -111,10 +113,9 @@ static FunctionCallInfo pltcl_current_fcinfo = NULL;
...
@@ -111,10 +113,9 @@ static FunctionCallInfo pltcl_current_fcinfo = NULL;
static
void
pltcl_init_all
(
void
);
static
void
pltcl_init_all
(
void
);
static
void
pltcl_init_interp
(
Tcl_Interp
*
interp
);
static
void
pltcl_init_interp
(
Tcl_Interp
*
interp
);
#ifdef
PLTCL_UNKNOWN_SUPPORT
#ifdef
ENABLE_PLTCL_UNKNOWN
static
void
pltcl_init_load_unknown
(
Tcl_Interp
*
interp
);
static
void
pltcl_init_load_unknown
(
Tcl_Interp
*
interp
);
#endif
#endif
/* PLTCL_UNKNOWN_SUPPORT */
Datum
pltcl_call_handler
(
PG_FUNCTION_ARGS
);
Datum
pltcl_call_handler
(
PG_FUNCTION_ARGS
);
Datum
pltclu_call_handler
(
PG_FUNCTION_ARGS
);
Datum
pltclu_call_handler
(
PG_FUNCTION_ARGS
);
...
@@ -230,7 +231,7 @@ pltcl_init_interp(Tcl_Interp *interp)
...
@@ -230,7 +231,7 @@ pltcl_init_interp(Tcl_Interp *interp)
Tcl_CreateCommand
(
interp
,
"spi_execp"
,
Tcl_CreateCommand
(
interp
,
"spi_execp"
,
pltcl_SPI_execp
,
NULL
,
NULL
);
pltcl_SPI_execp
,
NULL
,
NULL
);
#ifdef
PLTCL_UNKNOWN_SUPPORT
#ifdef
ENABLE_PLTCL_UNKNOWN
/************************************************************
/************************************************************
* Try to load the unknown procedure from pltcl_modules
* Try to load the unknown procedure from pltcl_modules
************************************************************/
************************************************************/
...
@@ -239,11 +240,11 @@ pltcl_init_interp(Tcl_Interp *interp)
...
@@ -239,11 +240,11 @@ pltcl_init_interp(Tcl_Interp *interp)
pltcl_init_load_unknown
(
interp
);
pltcl_init_load_unknown
(
interp
);
if
(
SPI_finish
()
!=
SPI_OK_FINISH
)
if
(
SPI_finish
()
!=
SPI_OK_FINISH
)
elog
(
ERROR
,
"pltcl_init_interp(): SPI_finish failed"
);
elog
(
ERROR
,
"pltcl_init_interp(): SPI_finish failed"
);
#endif
/*
PLTCL_UNKNOWN_SUPPORT
*/
#endif
/*
ENABLE_PLTCL_UNKNOWN
*/
}
}
#ifdef
PLTCL_UNKNOWN_SUPPORT
#ifdef
ENABLE_PLTCL_UNKNOWN
/**********************************************************************
/**********************************************************************
* pltcl_init_load_unknown() - Load the unknown procedure from
* pltcl_init_load_unknown() - Load the unknown procedure from
...
@@ -315,7 +316,7 @@ pltcl_init_load_unknown(Tcl_Interp *interp)
...
@@ -315,7 +316,7 @@ pltcl_init_load_unknown(Tcl_Interp *interp)
Tcl_DStringFree
(
&
unknown_src
);
Tcl_DStringFree
(
&
unknown_src
);
}
}
#endif
/*
PLTCL_UNKNOWN_SUPPORT
*/
#endif
/*
ENABLE_PLTCL_UNKNOWN
*/
/**********************************************************************
/**********************************************************************
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment