Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
8dcf998d
Commit
8dcf998d
authored
23 years ago
by
Tom Lane
Browse files
Options
Downloads
Patches
Plain Diff
Remove no-longer-needed dependencies on DLSUFFIX.
parent
62651c01
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/tutorial/Makefile
+3
-9
3 additions, 9 deletions
src/tutorial/Makefile
src/tutorial/README
+4
-15
4 additions, 15 deletions
src/tutorial/README
src/tutorial/complex.source
+12
-11
12 additions, 11 deletions
src/tutorial/complex.source
src/tutorial/funcs.source
+5
-5
5 additions, 5 deletions
src/tutorial/funcs.source
with
24 additions
and
40 deletions
src/tutorial/Makefile
+
3
−
9
View file @
8dcf998d
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
# Makefile for tutorial
# Makefile for tutorial
#
#
# IDENTIFICATION
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/tutorial/Makefile,v 1.1
3
2001/
08/09 13:52:06
tgl Exp $
# $Header: /cvsroot/pgsql/src/tutorial/Makefile,v 1.1
4
2001/
10/26 20:45:33
tgl Exp $
#
#
#-------------------------------------------------------------------------
#-------------------------------------------------------------------------
...
@@ -16,7 +16,7 @@ override CFLAGS+= $(CFLAGS_SL)
...
@@ -16,7 +16,7 @@ override CFLAGS+= $(CFLAGS_SL)
override
DLLLIBS
:=
$(
BE_DLLLIBS
)
$(
DLLLIBS
)
override
DLLLIBS
:=
$(
BE_DLLLIBS
)
$(
DLLLIBS
)
#
#
# DLOBJS
is
the dynamically-loaded object files. The "funcs" queries
# DLOBJS
are
the dynamically-loaded object files. The "funcs" queries
# include CREATE FUNCTIONs that load routines from these files.
# include CREATE FUNCTIONs that load routines from these files.
#
#
DLOBJS
=
complex
$(
DLSUFFIX
)
funcs
$(
DLSUFFIX
)
DLOBJS
=
complex
$(
DLSUFFIX
)
funcs
$(
DLSUFFIX
)
...
@@ -26,15 +26,9 @@ QUERIES= advanced.sql basics.sql complex.sql funcs.sql syscat.sql
...
@@ -26,15 +26,9 @@ QUERIES= advanced.sql basics.sql complex.sql funcs.sql syscat.sql
all
:
$(DLOBJS) $(QUERIES)
all
:
$(DLOBJS) $(QUERIES)
%.sql
:
%.source
%.sql
:
%.source
if
[
-z
"
$$
USER"
]
;
then
USER
=
$$
LOGNAME
;
fi
;
\
if
[
-z
"
$$
USER"
]
;
then
USER
=
`
whoami
`
;
fi
;
\
if
[
-z
"
$$
USER"
]
;
then
echo
'Cannot deduce $$USER.'
;
exit
1
;
fi
;
\
rm
-f
$@
;
\
rm
-f
$@
;
\
C
=
`
pwd
`
;
\
C
=
`
pwd
`
;
\
sed
-e
"s:_CWD_:
$$
C:g"
\
sed
-e
"s:_OBJWD_:
$$
C:g"
<
$<
>
$@
-e
"s:_OBJWD_:
$$
C:g"
\
-e
"s:_DLSUFFIX_:
$(
DLSUFFIX
)
:g"
\
-e
"s/_USER_/
$$
USER/g"
<
$<
>
$@
clean
:
clean
:
rm
-f
$(
DLOBJS
)
$(
QUERIES
)
rm
-f
$(
DLOBJS
)
$(
QUERIES
)
This diff is collapsed.
Click to expand it.
src/tutorial/README
+
4
−
15
View file @
8dcf998d
This directory contains SQL tutorial scripts. To look at them, first do a
This directory contains SQL tutorial scripts. To look at them, first do a
% make
% make
to compile all the scripts and C files for the user-defined functions
to compile all the scripts and C files for the user-defined functions
and types. (make needs to be GNU make
and
may be named something
and types. (make needs to be GNU make
--- it
may be named something
different on your system)
different on your system
, often gmake
)
Then, run psql with the -s flag:
Then, run psql with the -s
(single-step)
flag:
% psql -s
% psql -s
Welcome to the POSTGRESQL interactive sql monitor:
Please read the file COPYRIGHT for copyright terms of POSTGRESQL
type \? for help on slash commands
type \q to quit
type \g or terminate with semicolon to execute query
You are currently connected to the database: jolly
jolly==>
From within psql, you can try each individual script file by using
From within psql, you can try each individual script file by using
the \i <filename> psql command.
psql's \i <filename> command.
This diff is collapsed.
Click to expand it.
src/tutorial/complex.source
+
12
−
11
View file @
8dcf998d
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
--
--
-- Copyright (c) 1994, Regents of the University of California
-- Copyright (c) 1994, Regents of the University of California
--
--
-- $Id: complex.source,v 1.1
0
2001/10/
03
20:
54:22
tgl Exp $
-- $Id: complex.source,v 1.1
1
2001/10/
26
20:
45:33
tgl Exp $
--
--
---------------------------------------------------------------------------
---------------------------------------------------------------------------
...
@@ -18,7 +18,8 @@
...
@@ -18,7 +18,8 @@
-- called 'complex' which represents complex numbers.
-- called 'complex' which represents complex numbers.
-----------------------------
-----------------------------
-- Assume the user defined functions are in _OBJWD_/complex_DLSUFFIX_
-- Assume the user defined functions are in _OBJWD_/complex$DLSUFFIX
-- (we do not want to assume this is in the dynamic loader search path)
-- Look at $PWD/complex.c for the source.
-- Look at $PWD/complex.c for the source.
-- the input function 'complex_in' takes a null-terminated string (the
-- the input function 'complex_in' takes a null-terminated string (the
...
@@ -28,7 +29,7 @@
...
@@ -28,7 +29,7 @@
CREATE FUNCTION complex_in(opaque)
CREATE FUNCTION complex_in(opaque)
RETURNS complex
RETURNS complex
AS '_OBJWD_/complex
_DLSUFFIX_
'
AS '_OBJWD_/complex'
LANGUAGE 'c';
LANGUAGE 'c';
-- the output function 'complex_out' takes the internal representation and
-- the output function 'complex_out' takes the internal representation and
...
@@ -36,7 +37,7 @@ CREATE FUNCTION complex_in(opaque)
...
@@ -36,7 +37,7 @@ CREATE FUNCTION complex_in(opaque)
CREATE FUNCTION complex_out(opaque)
CREATE FUNCTION complex_out(opaque)
RETURNS opaque
RETURNS opaque
AS '_OBJWD_/complex
_DLSUFFIX_
'
AS '_OBJWD_/complex'
LANGUAGE 'c';
LANGUAGE 'c';
-- now, we can create the type. The internallength specifies the size of the
-- now, we can create the type. The internallength specifies the size of the
...
@@ -80,7 +81,7 @@ SELECT * FROM test_complex;
...
@@ -80,7 +81,7 @@ SELECT * FROM test_complex;
-- first, define a function complex_add (also in complex.c)
-- first, define a function complex_add (also in complex.c)
CREATE FUNCTION complex_add(complex, complex)
CREATE FUNCTION complex_add(complex, complex)
RETURNS complex
RETURNS complex
AS '_OBJWD_/complex
_DLSUFFIX_
'
AS '_OBJWD_/complex'
LANGUAGE 'c';
LANGUAGE 'c';
-- we can now define the operator. We show a binary operator here but you
-- we can now define the operator. We show a binary operator here but you
...
@@ -138,15 +139,15 @@ SELECT 'READ ABOVE!' AS STOP;
...
@@ -138,15 +139,15 @@ SELECT 'READ ABOVE!' AS STOP;
-- first, define the required operators
-- first, define the required operators
CREATE FUNCTION complex_abs_lt(complex, complex) RETURNS bool
CREATE FUNCTION complex_abs_lt(complex, complex) RETURNS bool
AS '_OBJWD_/complex
_DLSUFFIX_
' LANGUAGE 'c';
AS '_OBJWD_/complex' LANGUAGE 'c';
CREATE FUNCTION complex_abs_le(complex, complex) RETURNS bool
CREATE FUNCTION complex_abs_le(complex, complex) RETURNS bool
AS '_OBJWD_/complex
_DLSUFFIX_
' LANGUAGE 'c';
AS '_OBJWD_/complex' LANGUAGE 'c';
CREATE FUNCTION complex_abs_eq(complex, complex) RETURNS bool
CREATE FUNCTION complex_abs_eq(complex, complex) RETURNS bool
AS '_OBJWD_/complex
_DLSUFFIX_
' LANGUAGE 'c';
AS '_OBJWD_/complex' LANGUAGE 'c';
CREATE FUNCTION complex_abs_ge(complex, complex) RETURNS bool
CREATE FUNCTION complex_abs_ge(complex, complex) RETURNS bool
AS '_OBJWD_/complex
_DLSUFFIX_
' LANGUAGE 'c';
AS '_OBJWD_/complex' LANGUAGE 'c';
CREATE FUNCTION complex_abs_gt(complex, complex) RETURNS bool
CREATE FUNCTION complex_abs_gt(complex, complex) RETURNS bool
AS '_OBJWD_/complex
_DLSUFFIX_
' LANGUAGE 'c';
AS '_OBJWD_/complex' LANGUAGE 'c';
CREATE OPERATOR < (
CREATE OPERATOR < (
leftarg = complex, rightarg = complex, procedure = complex_abs_lt,
leftarg = complex, rightarg = complex, procedure = complex_abs_lt,
...
@@ -231,7 +232,7 @@ INSERT INTO pg_amop (amopclaid, amopstrategy, amopreqcheck, amopopr)
...
@@ -231,7 +232,7 @@ INSERT INTO pg_amop (amopclaid, amopstrategy, amopreqcheck, amopopr)
--
--
CREATE FUNCTION complex_abs_cmp(complex, complex) RETURNS int4
CREATE FUNCTION complex_abs_cmp(complex, complex) RETURNS int4
AS '_OBJWD_/complex
_DLSUFFIX_
' LANGUAGE 'c';
AS '_OBJWD_/complex' LANGUAGE 'c';
SELECT oid, proname FROM pg_proc WHERE proname = 'complex_abs_cmp';
SELECT oid, proname FROM pg_proc WHERE proname = 'complex_abs_cmp';
...
...
This diff is collapsed.
Click to expand it.
src/tutorial/funcs.source
+
5
−
5
View file @
8dcf998d
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
--
--
-- Copyright (c) 1994-5, Regents of the University of California
-- Copyright (c) 1994-5, Regents of the University of California
--
--
-- $Id: funcs.source,v 1.
4
200
0/03/28 02:49:19
tgl Exp $
-- $Id: funcs.source,v 1.
5
200
1/10/26 20:45:33
tgl Exp $
--
--
---------------------------------------------------------------------------
---------------------------------------------------------------------------
...
@@ -126,16 +126,16 @@ SELECT name(high_pay()) AS overpaid;
...
@@ -126,16 +126,16 @@ SELECT name(high_pay()) AS overpaid;
-----------------------------
-----------------------------
CREATE FUNCTION add_one(int4) RETURNS int4
CREATE FUNCTION add_one(int4) RETURNS int4
AS '_OBJWD_/funcs
_DLSUFFIX_
' LANGUAGE 'c';
AS '_OBJWD_/funcs' LANGUAGE 'c';
CREATE FUNCTION makepoint(point, point) RETURNS point
CREATE FUNCTION makepoint(point, point) RETURNS point
AS '_OBJWD_/funcs
_DLSUFFIX_
' LANGUAGE 'c';
AS '_OBJWD_/funcs' LANGUAGE 'c';
CREATE FUNCTION copytext(text) RETURNS text
CREATE FUNCTION copytext(text) RETURNS text
AS '_OBJWD_/funcs
_DLSUFFIX_
' LANGUAGE 'c';
AS '_OBJWD_/funcs' LANGUAGE 'c';
CREATE FUNCTION c_overpaid(EMP, int4) RETURNS bool
CREATE FUNCTION c_overpaid(EMP, int4) RETURNS bool
AS '_OBJWD_/funcs
_DLSUFFIX_
' LANGUAGE 'c';
AS '_OBJWD_/funcs' LANGUAGE 'c';
SELECT add_one(3) AS four;
SELECT add_one(3) AS four;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment