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

Commit0aba92a

Browse files
Edmund MerglEdmund Mergl
Edmund Mergl
authored and
Edmund Mergl
committed
creation for postgresql-6.1
1 parenta2fd844 commit0aba92a

File tree

11 files changed

+2681
-0
lines changed

11 files changed

+2681
-0
lines changed

‎src/interfaces/perl5/ApachePg.pl

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#!/usr/local/bin/perl
2+
3+
# demo script, has been tested with:
4+
# - Postgres-6.1
5+
# - apache_1.2b8
6+
# - mod_perl-0.97
7+
# - perl5.003_93
8+
9+
use CGI::Apache;
10+
use Pg;
11+
use strict;
12+
13+
my$query = new CGI;
14+
15+
print$query->header,
16+
$query->start_html(-title=>'A Simple Example'),
17+
$query->startform,
18+
"<CENTER><H3>Testing Module Pg</H3></CENTER>",
19+
"Enter the database name:",
20+
$query->textfield(-name=>'dbname'),
21+
"<P>",
22+
"Enter the select command:",
23+
$query->textfield(-name=>'cmd', -size=>40),
24+
"<P>",
25+
$query->submit(-value=>'Submit'),
26+
$query->endform;
27+
28+
if ($query->param) {
29+
30+
my$dbname =$query->param('dbname');
31+
my$conn = Pg::connectdb("dbname =$dbname");
32+
my$cmd =$query->param('cmd');
33+
my$result =$conn->exec($cmd);
34+
my$i,$j;
35+
print"<P><CENTER><TABLE CELLPADDING=4 CELLSPACING=2 BORDER=1>\n";
36+
for ($i=0;$i <$result->ntuples;$i++) {
37+
print"<TR>\n";
38+
for ($j=0;$j <$result->nfields;$j++) {
39+
print"<TD ALIGN=CENTER>",$result->getvalue($i,$j),"\n";
40+
}
41+
}
42+
43+
print"</TABLE></CENTER><P>\n";
44+
}
45+
46+
print$query->end_html;
47+

‎src/interfaces/perl5/Changes

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
Revision history for Perl extension Pg.
2+
3+
1.0 Mar 24, 1995
4+
- creation
5+
6+
1.1 Jun 6, 1995
7+
- Bug fix in PQgetline.
8+
9+
1.1.1 Aug 5, 95
10+
- adapted to postgres95-beta0.03
11+
- Note: the libpq interface has changed completely !
12+
13+
1.2.0 Oct 15, 1995
14+
- adapted to Postgres95-1.0
15+
- README updated
16+
- doQuery() in Pg.pm now returns 0 upon success
17+
- testlibpq.pl: added test for PQgetline()
18+
19+
1.3.1 Oct 22, 1996
20+
- adapted to Postgres95-1.08
21+
- large-object interface added, thanks to
22+
Sven Verdoolaege (skimo@breughel.ufsia.ac.be)
23+
- PQgetline() changed. This breaks old scripts !
24+
- PQexec now returns in any case a valid pointer.
25+
This fixes the annoying message:
26+
'res is not of type PGresultPtr at ...'
27+
- testsuite completely rewritten, contains
28+
now examples for almost all functions
29+
- resturn codes are now available as constants (PGRES_xxx)
30+
- PQnotifies() works now
31+
- enhanced doQuery()
32+
33+
1.3.2 Nov 11, 1996
34+
- adapted to Postgres95-1.09
35+
- test.pl adapted to postgres95-1.0.9:
36+
PQputline expects now '\.' as last input
37+
and PQgetline outputs '\.' as last line.
38+
39+
40+
1.4.2 Nov 21, 1996
41+
- added a more Perl-like syntax
42+
43+
44+
1.5.3 Jan 2, 1997
45+
- adapted to PostgreSQL-6.0
46+
- new functions PQconnectdb, PQuser
47+
- changed name of method 'new' to 'setdb'
48+
49+
50+
1.5.4 Feb 12, 1997
51+
- changed test.pl for large objects:
52+
test only lo_import and lo_export
53+
54+
1.6.0 Apr 29, 1997
55+
- renamed to pgsql_perl5
56+
- adapted to PostgreSQL-6.1
57+
- test only functions, which are also
58+
tested in pgsql regression tests

‎src/interfaces/perl5/MANIFEST

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
ApachePg.pl
2+
Changes
3+
MANIFEST
4+
Makefile.PL
5+
Pg.pm
6+
Pg.xs
7+
README
8+
test.pl
9+
test.pl.newstyle
10+
test.pl.oldstyle
11+
typemap

‎src/interfaces/perl5/Makefile.PL

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#-------------------------------------------------------
2+
#
3+
# $Id: Makefile.PL,v 1.1.1.1 1997/04/29 19:37:09 mergl Exp $
4+
#
5+
# Copyright (c) 1997 Edmund Mergl
6+
#
7+
#-------------------------------------------------------
8+
9+
use ExtUtils::MakeMaker;
10+
11+
print"\nConfiguring Pg\n";
12+
print"Remember to actually read the README file !\n";
13+
die"\nYou didn't read the README file !\n"unless ($] >= 5.003);
14+
15+
if (!$ENV{POSTGRESHOME}) {
16+
warn"\$POSTGRESHOME not defined. Searching for Postgres...\n";
17+
foreach(qw(/usr/pgsql /usr/local/pgsql /usr/pgsql-6.1 /usr/local/pgsql-6.1)) {
18+
if (-d"$_/lib") {
19+
$ENV{POSTGRESHOME} =$_;
20+
last;
21+
}
22+
}
23+
}
24+
25+
if ($ENV{POSTGRESHOME}) {
26+
print"\nFound Postgres in$ENV{POSTGRESHOME}\n";
27+
}else {
28+
die"Unable to determine\$POSTGRESHOME !\n";
29+
}
30+
31+
WriteMakefile(
32+
'NAME'=>'Pg',
33+
'VERSION_FROM'=>'Pg.pm',
34+
'LIBS'=> ["-L$ENV{POSTGRESHOME}/lib -lpq"],
35+
'INC'=>"-I$ENV{POSTGRESHOME}/include",
36+
);
37+
38+
# EOF

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp