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

Commit9e74edd

Browse files
Edmund MerglEdmund Mergl
Edmund Mergl
authored and
Edmund Mergl
committed
*** empty log message ***
1 parentb02086b commit9e74edd

File tree

10 files changed

+131
-817
lines changed

10 files changed

+131
-817
lines changed

‎src/interfaces/perl5/ApachePg.pl

Lines changed: 0 additions & 47 deletions
This file was deleted.

‎src/interfaces/perl5/Changes

Lines changed: 44 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,40 @@
11
Revision history for Perl extension Pg.
22

3-
1.0 Mar 24, 1995
4-
- creation
3+
1.6.2 Sep 20 1997
4+
- adapted to PostgresqL-6.2:
5+
o added support for new method cmdTuples
6+
o cmdStatus returns now for DELETE the status
7+
followed by the number of affected rows,
8+
- test.pl.newstyle renamed to eg/example.newstyle
9+
- test.pl.oldstyle renamed to eg/example.oldstyle
10+
- example script ApachePg.pl now uses
11+
$result->print with HTML option
12+
- Makefile looks for $ENV{POSTGRES_HOME} instead of
13+
$ENV{POSTGRESHOME}
514

6-
1.1 Jun 6, 1995
7-
- Bug fix in PQgetline.
15+
1.6.1 Jun 02 1997
16+
- renamed to pgsql_perl5
17+
- adapted to PostgreSQL-6.1
18+
- test only functions, which are also
19+
tested in pgsql regression tests
820

9-
1.1.1 Aug 5, 95
10-
- adapted to postgres95-beta0.03
11-
- Note: the libpq interface has changed completely !
21+
1.5.4 Feb 12, 1997
22+
- changed test.pl for large objects:
23+
test only lo_import and lo_export
1224

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()
25+
1.5.3 Jan 2, 1997
26+
- adapted to PostgreSQL-6.0
27+
- new functions PQconnectdb, PQuser
28+
- changed name of method 'new' to 'setdb'
29+
30+
1.4.2 Nov 21, 1996
31+
- added a more Perl-like syntax
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.
1838

1939
1.3.1 Oct 22, 1996
2040
- adapted to Postgres95-1.08
@@ -30,29 +50,18 @@ Revision history for Perl extension Pg.
3050
- PQnotifies() works now
3151
- enhanced doQuery()
3252

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'
53+
1.2.0 Oct 15, 1995
54+
- adapted to Postgres95-1.0
55+
- README updated
56+
- doQuery() in Pg.pm now returns 0 upon success
57+
- testlibpq.pl: added test for PQgetline()
4858

59+
1.1.1 Aug 5, 95
60+
- adapted to postgres95-beta0.03
61+
- Note: the libpq interface has changed completely !
4962

50-
1.5.4 Feb 12, 1997
51-
- changed test.pl for large objects:
52-
test only lo_import and lo_export
63+
1.1 Jun 6, 1995
64+
- Bug fix in PQgetline.
5365

54-
1.6.1 Jun 02 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
66+
1.0 Mar 24, 1995
67+
- creation

‎src/interfaces/perl5/MANIFEST

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
ApachePg.pl
21
Changes
32
MANIFEST
43
Makefile.PL
54
Pg.pm
65
Pg.xs
76
README
7+
eg/ApachePg.pl
8+
eg/example.newstyle
9+
eg/example.oldstyle
810
test.pl
9-
test.pl.newstyle
10-
test.pl.oldstyle
1111
typemap

‎src/interfaces/perl5/Makefile.PL

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#-------------------------------------------------------
22
#
3-
# $Id: Makefile.PL,v 1.2 1997/06/02 19:41:59 mergl Exp $
3+
# $Id: Makefile.PL,v 1.3 1997/09/17 20:46:20 mergl Exp $
44
#
55
# Copyright (c) 1997 Edmund Mergl
66
#
@@ -12,27 +12,27 @@ print "\nConfiguring Pg\n";
1212
print"Remember to actually read the README file !\n";
1313
die"\nYou didn't read the README file !\n"unless ($] >= 5.003);
1414

15-
if (!$ENV{POSTGRESHOME}) {
16-
warn"\$POSTGRESHOME not defined. Searching forPostgres...\n";
15+
if (!$ENV{POSTGRES_HOME}) {
16+
warn"\$POSTGRES_HOME not defined. Searching forPostgreSQL...\n";
1717
foreach(qw(/usr/pgsql /usr/local/pgsql /usr/pgsql-6.1 /usr/local/pgsql-6.1)) {
1818
if (-d"$_/lib") {
19-
$ENV{POSTGRESHOME} =$_;
19+
$ENV{POSTGRES_HOME} =$_;
2020
last;
2121
}
2222
}
2323
}
2424

25-
if ($ENV{POSTGRESHOME}) {
26-
print"\nFoundPostgres in$ENV{POSTGRESHOME}\n";
25+
if ($ENV{POSTGRES_HOME}) {
26+
print"\nFoundPostgreSQL in$ENV{POSTGRES_HOME}\n";
2727
}else {
28-
die"Unable to determine\$POSTGRESHOME !\n";
28+
die"Unable to determine\$POSTGRES_HOME !\n";
2929
}
3030

3131
WriteMakefile(
3232
'NAME'=>'Pg',
3333
'VERSION_FROM'=>'Pg.pm',
34-
'LIBS'=> ["-L$ENV{POSTGRESHOME}/lib -lpq"],
35-
'INC'=>"-I$ENV{POSTGRESHOME}/include",
34+
'LIBS'=> ["-L$ENV{POSTGRES_HOME}/lib -lpq"],
35+
'INC'=>"-I$ENV{POSTGRES_HOME}/include",
3636
);
3737

3838
# EOF

‎src/interfaces/perl5/Pg.pm

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#-------------------------------------------------------
22
#
3-
# $Id: Pg.pm,v 1.2 1997/06/02 19:42:01 mergl Exp $
3+
# $Id: Pg.pm,v 1.3 1997/09/17 20:46:21 mergl Exp $
44
#
55
# Copyright (c) 1997 Edmund Mergl
66
#
@@ -15,7 +15,7 @@ use vars qw($VERSION @ISA @EXPORT $AUTOLOAD);
1515
require Exporter;
1616
require DynaLoader;
1717
require AutoLoader;
18-
require 5.003;
18+
require 5.002;
1919

2020
@ISA =qw(Exporter DynaLoader);
2121

@@ -50,6 +50,7 @@ require 5.003;
5050
PQfsize
5151
PQcmdStatus
5252
PQoidStatus
53+
PQcmdTuples
5354
PQgetvalue
5455
PQgetlength
5556
PQgetisnull
@@ -83,7 +84,7 @@ require 5.003;
8384
PGRES_InvalidOid
8485
);
8586

86-
$VERSION ='1.6.1';
87+
$Pg::VERSION ='1.6.2';
8788

8889
subAUTOLOAD {
8990
# This AUTOLOAD is used to 'autoload' constants from the constant()
@@ -140,7 +141,7 @@ __END__
140141
141142
=head1NAME
142143
143-
Pg -Perl extension for PostgreSQL
144+
Pg -Perl5 extension for PostgreSQL
144145
145146
146147
=head1SYNOPSIS
@@ -194,7 +195,7 @@ to an object goes away.
194195
=head2old style
195196
196197
All functions and constants are imported into the calling
197-
packagesnamespace. In order to to get a uniform naming,
198+
packagesname-space. In order to to get a uniform naming,
198199
all functions start with 'PQ' (e.g. PQlo_open) and all
199200
constants start with 'PGRES_' (e.g. PGRES_CONNECTION_OK).
200201
@@ -245,7 +246,7 @@ fields of this structure.
245246
246247
Opens a new connection to the backend. You may use an empty string for
247248
any argument, in which case first the environment is checked and then
248-
hardcoded defaults are used. The connection identifier $conn ( a pointer
249+
hard-coded defaults are used. The connection identifier $conn ( a pointer
249250
to the PGconn structure ) must be used in subsequent commands for unique
250251
identification. Before using $conn you should call $conn->status to ensure,
251252
that the connection was properly made. Use the methods below to access
@@ -374,7 +375,7 @@ methods you can access almost all fields of this structure.
374375
375376
Use the functions below to access the contents of the PGresult structure.
376377
377-
$ntups = $result->ntuples
378+
$ntuples = $result->ntuples
378379
379380
Returns the number of tuples in the query result.
380381
@@ -430,13 +431,22 @@ command executed:
430431
431432
$cmdStatus = $result->cmdStatus
432433
433-
Returns the command status of the last query command.
434+
Returns the command status of the last query command.
435+
In case of DELETE it returns also the number of deleted tuples.
436+
In case of INSERT it returns also the OID of the inserted
437+
tuple followed by 1 (the number of affected tuples).
438+
434439
435440
$oid = $result->oidStatus
436441
437442
In case the last query was an INSERT command it returns the oid of the
438443
inserted tuple.
439444
445+
$oid = $result->cmdTuples
446+
447+
In case the last query was an INSERT or DELETE command it returns the
448+
number of affected tuples.
449+
440450
$result->printTuples($fout, $printAttName, $terseOutput, $width)
441451
442452
Kept for backward compatibility. Use print.
@@ -462,13 +472,13 @@ Frees all memory of the given result.
462472
463473
These functions provide file-oriented access to user data.
464474
The large object interface is modeled after the Unix file
465-
system interface withanalogues of open, close, read, write,
475+
system interface withanalogies of open, close, read, write,
466476
lseek, tell. In order to get a consistent naming, all function
467477
names have been prepended with 'PQ' (old style only).
468478
469479
$lobjId = $conn->lo_creat($mode)
470480
471-
Creates a new large object. $mode is abitmask describing
481+
Creates a new large object. $mode is abit-mask describing
472482
different attributes of the new object. Use the following constants:
473483
474484
- PGRES_INV_SMGRMASK
@@ -529,6 +539,6 @@ Returns -1 upon failure, 1 otherwise.
529539
530540
=head1SEE ALSO
531541
532-
libpq(3),large_objects(3).
542+
L<libpq>,L<large_objects>
533543
534544
=cut

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp