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
df58a902
Commit
df58a902
authored
Jun 01, 1998
by
Edmund Mergl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adapted Makefile.PL to be build in source tree
parent
fc06df70
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
114 additions
and
65 deletions
+114
-65
src/interfaces/perl5/Changes
src/interfaces/perl5/Changes
+17
-0
src/interfaces/perl5/Makefile.PL
src/interfaces/perl5/Makefile.PL
+46
-24
src/interfaces/perl5/Pg.pm
src/interfaces/perl5/Pg.pm
+3
-3
src/interfaces/perl5/Pg.xs
src/interfaces/perl5/Pg.xs
+2
-2
src/interfaces/perl5/README
src/interfaces/perl5/README
+13
-11
src/interfaces/perl5/eg/ApachePg.pl
src/interfaces/perl5/eg/ApachePg.pl
+9
-1
src/interfaces/perl5/eg/example.newstyle
src/interfaces/perl5/eg/example.newstyle
+7
-7
src/interfaces/perl5/eg/example.oldstyle
src/interfaces/perl5/eg/example.oldstyle
+7
-7
src/interfaces/perl5/test.pl
src/interfaces/perl5/test.pl
+8
-8
src/interfaces/perl5/typemap
src/interfaces/perl5/typemap
+2
-2
No files found.
src/interfaces/perl5/Changes
View file @
df58a902
#-------------------------------------------------------
#
# $Id: Changes,v 1.7 1998/06/01 16:41:18 mergl Exp $
#
# Copyright (c) 1997, 1998 Edmund Mergl
#
#-------------------------------------------------------
Revision history for Perl extension Pg.
1.7.4 May 28 1998
- applied patches from
Brook Milligan <brook@trillium.NMSU.Edu>:
o changed Makefile.PL to look for include files
and libs in the source tree, except when the
environment variable POSTGRES_HOME is set.
o bug-fix in test.pl
1.7.3 Mar 28 1998
- linking again with the shared version of libpq
due to problems on several operating systems.
...
...
src/interfaces/perl5/Makefile.PL
View file @
df58a902
#-------------------------------------------------------
#
# $Id: Makefile.PL,v 1.
7 1998/04/14 21:14:34
mergl Exp $
# $Id: Makefile.PL,v 1.
8 1998/06/01 16:41:19
mergl Exp $
#
# Copyright (c) 1997 Edmund Mergl
# Copyright (c) 1997
, 1998
Edmund Mergl
#
#-------------------------------------------------------
...
...
@@ -10,33 +10,55 @@ use ExtUtils::MakeMaker;
use
Config
;
use
strict
;
print
"\nConfiguring Pg\n"
;
print
"Remember to actually read the README file !\n"
;
die
"\nYou didn't read the README file !\n"
unless
($]
>=
5.002);
# because the perl5 interface is always contained in the source tree,
# we can be sure about the location of the include files and libs.
# For development and testing we still test for POSTGRES_HOME.
#
#print "\nConfiguring Pg\n";
#print "Remember to actually read the README file !\n";
#die "\nYou didn't read the README file !\n" unless ($] >= 5.002);
#
#if (! $ENV{POSTGRES_HOME}) {
# warn "\$POSTGRES_HOME not defined. Searching for PostgreSQL...\n";
# foreach(qw(../../../ /usr/local/pgsql /usr/pgsql /home/pgsql /opt/pgsql /usr/local/postgres /usr/postgres /home/postgres /opt/postgres)) {
# if (-d "$_/lib") {
# $ENV{POSTGRES_HOME} = $_;
# last;
# }
# }
#}
#
#if (-d "$ENV{POSTGRES_HOME}/lib") {
# print "Found PostgreSQL in $ENV{POSTGRES_HOME}\n";
#} else {
# die "Unable to determine PostgreSQL\n";
#}
my
%
opts
;
if
(
!
$ENV
{
POSTGRES_HOME
})
{
warn
"\$POSTGRES_HOME not defined. Searching for PostgreSQL...\n"
;
foreach(qw(/usr/local/pgsql
/usr/pgsql
/home/pgsql
/opt/pgsql
/usr/local/postgres
/usr/postgres
/home/postgres
/opt/postgres))
{
if
(-d
"$_/lib"
)
{
$ENV{POSTGRES_HOME}
=
$_
;
last;
}
}
}
if
(-d
"$ENV{POSTGRES_HOME}/lib"
)
{
print
"Found PostgreSQL in $ENV{POSTGRES_HOME}\n"
;
my
$cwd
=
`
pwd
`;
chop
$cwd
;
%
opts
=
(
NAME
=>
'
Pg
',
VERSION_FROM
=>
'
Pg.pm
',
INC
=>
"
-I
$cwd
/../libpq -I
$cwd
/../../include
",
OBJECT
=>
"
Pg
\
$(OBJ_EXT)
",
LIBS
=>
["
-L
$cwd
/../libpq -lpq
"],
);
}
else
{
die
"Unable to determine PostgreSQL\n"
;
}
my
%
opts
=
(
NAME
=>
'Pg'
,
VERSION_FROM
=>
'Pg.pm'
,
INC
=>
"-I
$ENV
{POSTGRES_HOME}/include -I/usr/local/include/pgsql -I/usr/include/pgsql"
,
OBJECT
=>
"Pg
\$
(OBJ_EXT)"
,
LIBS
=>
[
"-L
$ENV
{POSTGRES_HOME}/lib -lpq"
]
,
);
%
opts
=
(
NAME
=>
'
Pg
',
VERSION_FROM
=>
'
Pg.pm
',
INC
=>
"
-I
$ENV
{POSTGRES_HOME}/include
",
OBJECT
=>
"
Pg
\
$(OBJ_EXT)
",
LIBS
=>
["
-L
$ENV
{POSTGRES_HOME}/lib -lpq
"],
);
}
WriteMakefile
(
%
opts
);
...
...
src/interfaces/perl5/Pg.pm
View file @
df58a902
#-------------------------------------------------------
#
# $Id: Pg.pm,v 1.
6 1998/04/14 21:14:35
mergl Exp $
# $Id: Pg.pm,v 1.
7 1998/06/01 16:41:19
mergl Exp $
#
# Copyright (c) 1997 Edmund Mergl
# Copyright (c) 1997
, 1998
Edmund Mergl
#
#-------------------------------------------------------
...
...
@@ -84,7 +84,7 @@ require 5.002;
PGRES_InvalidOid
)
;
$
Pg::
VERSION
=
'
1.7.
3
';
$
Pg::
VERSION
=
'
1.7.
4
';
sub
AUTOLOAD
{
# This AUTOLOAD is used to 'autoload' constants from the constant()
...
...
src/interfaces/perl5/Pg.xs
View file @
df58a902
/*-------------------------------------------------------
*
* $Id: Pg.xs,v 1.
6 1998/04/14 21:14:36
mergl Exp $
* $Id: Pg.xs,v 1.
7 1998/06/01 16:41:19
mergl Exp $
*
* Copyright (c) 1997 Edmund Mergl
* Copyright (c) 1997
, 1998
Edmund Mergl
*
*-------------------------------------------------------*/
...
...
src/interfaces/perl5/README
View file @
df58a902
#-------------------------------------------------------
#
# $Id: README,v 1.
6 1998/04/14 21:14:37
mergl Exp $
# $Id: README,v 1.
7 1998/06/01 16:41:19
mergl Exp $
#
# Copyright (c) 1997 Edmund Mergl
# Copyright (c) 1997
, 1998
Edmund Mergl
#
#-------------------------------------------------------
DESCRIPTION:
------------
This is version 1.7.
3
of pgsql_perl5 (previously called pg95perl5).
This is version 1.7.
4
of pgsql_perl5 (previously called pg95perl5).
Pgsql_perl5 is an interface between Larry Wall's language perl version 5 and
the database PostgreSQL (previously Postgres95). This has been done by using
...
...
@@ -63,13 +63,16 @@ PLATFORMS:
INSTALLATION:
-------------
Using dynamic loading for perl extensions, the preferred method is to unpack
the tar file outside the perl source tree. This assumes, that you already
have installed perl5.
Since the perl5 interface is always contained in the source tree of PostgreSQL,
it is usually build together with PostgreSQL itself. This can be obtained by
adding the option '--with-perl' to the configure command.
In case you need to build the perl interface stand alone, you need to set the
environment variable POSTGRES_HOME, pointing to the PostgreSQL home-directory.
Also PostgreSQL needs to be installed having the include files in
$POSTGRES_HOME/include and the libs in $POSTGRES_HOME/lib. Then you have to
build the module as any standard perl-module with the following commands:
The Makefile checks the environment variable POSTGRES_HOME as well some
standard locations, to find the root directory of your Postgres installation.
1. perl Makefile.PL
2. make
3. make test
...
...
@@ -117,7 +120,6 @@ HP users: if you get error messages like:
Dan Lauterbach <danla@dimensional.com>
DOCUMENTATION:
--------------
...
...
@@ -127,6 +129,6 @@ installation to read the documentation.
---------------------------------------------------------------------------
Edmund Mergl <E.Mergl@bawue.de>
March
28, 1998
Edmund Mergl <E.Mergl@bawue.de>
May
28, 1998
---------------------------------------------------------------------------
src/interfaces/perl5/eg/ApachePg.pl
View file @
df58a902
#!/usr/local/bin/perl
#-------------------------------------------------------
#
# $Id: ApachePg.pl,v 1.4 1998/06/01 16:41:26 mergl Exp $
#
# Copyright (c) 1997, 1998 Edmund Mergl
#
#-------------------------------------------------------
# demo script, tested with:
# - PostgreSQL-6.3
# - apache_1.3
...
...
@@ -37,7 +45,7 @@ if ($query->param) {
print
"
<P><CENTER><TABLE CELLPADDING=4 CELLSPACING=2 BORDER=1>
\n
";
my
@row
;
while
(
@row
=
$result
->
fetchrow
)
{
print
"
<TR><TD>
",
join
("
</TD><TD>
",
@row
),
"
</TD></TR>
\n
";
print
"
<TR><TD>
",
join
("
</TD><TD>
",
@row
),
"
</TD></TR>
";
}
print
"
</TABLE></CENTER><P>
\n
";
}
else
{
...
...
src/interfaces/perl5/eg/example.newstyle
View file @
df58a902
...
...
@@ -2,9 +2,9 @@
#-------------------------------------------------------
#
# $Id: example.newstyle,v 1.
4 1998/04/14 21:14:50
mergl Exp $
# $Id: example.newstyle,v 1.
5 1998/06/01 16:41:27
mergl Exp $
#
# Copyright (c) 1997 Edmund Mergl
# Copyright (c) 1997
, 1998
Edmund Mergl
#
#-------------------------------------------------------
...
...
@@ -122,7 +122,7 @@ cmp_ne("", $port);
######################### create and insert into table
# 8-19
$result
=
$conn
->
exec
("
CREATE TABLE person (id int4, name char
16
)
");
$result
=
$conn
->
exec
("
CREATE TABLE person (id int4, name char
(16)
)
");
cmp_eq
(
PGRES_COMMAND_OK
,
$result
->
resultStatus
);
cmp_eq
("
CREATE
",
$result
->
cmdStatus
);
...
...
@@ -143,7 +143,7 @@ $ret = 0;
while
(
-
1
!=
$ret
)
{
$ret
=
$conn
->
getline
(
$string
,
256
);
last
if
$string
eq
"
\\
.
";
cmp_eq
("
$i
Edmund Mergl
",
$string
);
cmp_eq
("
$i
Edmund Mergl
",
$string
);
$i
++
;
}
...
...
@@ -190,8 +190,8 @@ for ($k = 0; $k < $result->nfields; $k++) {
cmp_eq
(
4
,
$fsize
);
}
else
{
cmp_eq
("
name
",
$fname
);
cmp_eq
(
20
,
$ftype
);
cmp_eq
(
16
,
$fsize
);
cmp_eq
(
1042
,
$ftype
);
cmp_eq
(
-
1
,
$fsize
);
}
$fnumber
=
$result
->
fnumber
(
$fname
);
cmp_eq
(
$k
,
$fnumber
);
...
...
@@ -201,7 +201,7 @@ $string = "";
while
(
@row
=
$result
->
fetchrow
)
{
$string
=
join
("
",
@row
);
}
cmp_eq
("
5 Edmund Mergl
",
$string
);
cmp_eq
("
5 Edmund Mergl
",
$string
);
######################### PQnotifies
# 43-46
...
...
src/interfaces/perl5/eg/example.oldstyle
View file @
df58a902
...
...
@@ -2,9 +2,9 @@
#-------------------------------------------------------
#
# $Id: example.oldstyle,v 1.
4 1998/04/14 21:14:52
mergl Exp $
# $Id: example.oldstyle,v 1.
5 1998/06/01 16:41:27
mergl Exp $
#
# Copyright (c) 1997 Edmund Mergl
# Copyright (c) 1997
, 1998
Edmund Mergl
#
#-------------------------------------------------------
...
...
@@ -126,7 +126,7 @@ cmp_ne("", $port);
######################### create and insert into table
# 8-19
$result
=
PQexec
(
$conn
,
"
CREATE TABLE person (id int4, name char
16
)
");
$result
=
PQexec
(
$conn
,
"
CREATE TABLE person (id int4, name char
(16)
)
");
cmp_eq
(
PGRES_COMMAND_OK
,
PQresultStatus
(
$result
));
cmp_eq
("
CREATE
",
PQcmdStatus
(
$result
));
PQclear
(
$result
);
...
...
@@ -150,7 +150,7 @@ $ret = 0;
while
(
-
1
!=
$ret
)
{
$ret
=
PQgetline
(
$conn
,
$string
,
256
);
last
if
$string
eq
"
\\
.
";
cmp_eq
("
$i
Edmund Mergl
",
$string
);
cmp_eq
("
$i
Edmund Mergl
",
$string
);
$i
++
;
}
...
...
@@ -201,8 +201,8 @@ for ($k = 0; $k < PQnfields($result); $k++) {
cmp_eq
(
4
,
$fsize
);
}
else
{
cmp_eq
("
name
",
$fname
);
cmp_eq
(
20
,
$ftype
);
cmp_eq
(
16
,
$fsize
);
cmp_eq
(
1042
,
$ftype
);
cmp_eq
(
-
1
,
$fsize
);
}
$fnumber
=
PQfnumber
(
$result
,
$fname
);
cmp_eq
(
$k
,
$fnumber
);
...
...
@@ -214,7 +214,7 @@ for ($k = 0; $k < PQntuples($result); $k++) {
$string
.=
PQgetvalue
(
$result
,
$k
,
$l
)
.
"
";
}
$i
=
$k
+
1
;
cmp_eq
("
$i
Edmund Mergl
",
$string
);
cmp_eq
("
$i
Edmund Mergl
",
$string
);
}
PQclear
(
$result
);
...
...
src/interfaces/perl5/test.pl
View file @
df58a902
...
...
@@ -2,9 +2,9 @@
#-------------------------------------------------------
#
# $Id: test.pl,v 1.
7 1998/04/14 21:14:38
mergl Exp $
# $Id: test.pl,v 1.
8 1998/06/01 16:41:20
mergl Exp $
#
# Copyright (c) 1997 Edmund Mergl
# Copyright (c) 1997
, 1998
Edmund Mergl
#
#-------------------------------------------------------
...
...
@@ -122,7 +122,7 @@ cmp_ne("", $port);
######################### create and insert into table
# 8-19
$result
=
$conn
->
exec
("
CREATE TABLE person (id int4, name char
16
)
");
$result
=
$conn
->
exec
("
CREATE TABLE person (id int4, name char
(16)
)
");
cmp_eq
(
PGRES_COMMAND_OK
,
$result
->
resultStatus
);
cmp_eq
("
CREATE
",
$result
->
cmdStatus
);
...
...
@@ -143,8 +143,8 @@ $ret = 0;
while
(
-
1
!=
$ret
)
{
$ret
=
$conn
->
getline
(
$string
,
256
);
last
if
$string
eq
"
\\
.
";
cmp_eq
("
$i
Edmund Mergl
",
$string
);
$i
++
;
cmp_eq
("
$i
Edmund Mergl
",
$string
);
$i
++
;
}
cmp_eq
(
0
,
$conn
->
endcopy
);
...
...
@@ -190,8 +190,8 @@ for ($k = 0; $k < $result->nfields; $k++) {
cmp_eq
(
4
,
$fsize
);
}
else
{
cmp_eq
("
name
",
$fname
);
cmp_eq
(
20
,
$ftype
);
cmp_eq
(
16
,
$fsize
);
cmp_eq
(
1042
,
$ftype
);
cmp_eq
(
-
1
,
$fsize
);
}
$fnumber
=
$result
->
fnumber
(
$fname
);
cmp_eq
(
$k
,
$fnumber
);
...
...
@@ -201,7 +201,7 @@ $string = "";
while
(
@row
=
$result
->
fetchrow
)
{
$string
=
join
("
",
@row
);
}
cmp_eq
("
5 Edmund Mergl
",
$string
);
cmp_eq
("
5 Edmund Mergl
",
$string
);
######################### debug, PQuntrace
...
...
src/interfaces/perl5/typemap
View file @
df58a902
#-------------------------------------------------------
#
# $Id: typemap,v 1.
6 1998/04/14 21:14:39
mergl Exp $
# $Id: typemap,v 1.
7 1998/06/01 16:41:20
mergl Exp $
#
# Copyright (c) 1997 Edmund Mergl
# Copyright (c) 1997
, 1998
Edmund Mergl
#
#-------------------------------------------------------
...
...
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