Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit b0546a2

Browse files
committed
Fix libpq++'s FieldSize to return int, not short.
1 parent 9668b94 commit b0546a2

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

doc/src/sgml/libpq++.sgml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpq++.sgml,v 1.29 2001/05/09 17:29:09 momjian Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpq++.sgml,v 1.30 2001/05/09 17:46:11 momjian Exp $
33
-->
44

55
<chapter id="libpqplusplus">
@@ -430,7 +430,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpq++.sgml,v 1.29 2001/05/09 17:29:
430430
Returns the size in bytes of the field associated with the given
431431
field index. Field indices start at 0.
432432
<synopsis>
433-
short PgDatabase::FieldSize(int field_num) const
433+
int PgDatabase::FieldSize(int field_num) const
434434
</synopsis>
435435
Returns the space allocated for this field in a database tuple given
436436
the field number. In other words the size of the server's binary
@@ -444,7 +444,7 @@ $Header: /cvsroot/pgsql/doc/src/sgml/Attic/libpq++.sgml,v 1.29 2001/05/09 17:29:
444444
Returns the size in bytes of the field associated with the given
445445
field index. Field indices start at 0.
446446
<synopsis>
447-
short PgDatabase::FieldSize(const char *field_name) const
447+
int PgDatabase::FieldSize(const char *field_name) const
448448
</synopsis>
449449
Returns the space allocated for this field in a database tuple given
450450
the field name. In other words the size of the server's binary

src/interfaces/libpq++/TODO

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11

22
* Implement exceptions
33
* Many other things I have yet to discover
4-
* fix getLength to return an int and not a short
54

src/interfaces/libpq++/pgdatabase.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Copyright (c) 1994, Regents of the University of California
1111
*
1212
* IDENTIFICATION
13-
* $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/pgdatabase.cc,v 1.10 2001/05/09 17:29:10 momjian Exp $
13+
* $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/pgdatabase.cc,v 1.11 2001/05/09 17:46:11 momjian Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -106,13 +106,13 @@ return PQftype(pgResult, FieldNum(field_name));
106106
}
107107

108108

109-
short PgDatabase::FieldSize(int field_num) const
109+
int PgDatabase::FieldSize(int field_num) const
110110
{
111111
return PQfsize(pgResult, field_num);
112112
}
113113

114114

115-
short PgDatabase::FieldSize(const char* field_name) const
115+
int PgDatabase::FieldSize(const char* field_name) const
116116
{
117117
return PQfsize(pgResult, FieldNum(field_name));
118118
}

src/interfaces/libpq++/pgdatabase.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* Portions Copyright (c) 1994, Regents of the University of California
1515
*
1616
*
17-
* $Id: pgdatabase.h,v 1.10 2001/05/09 17:29:10 momjian Exp $
17+
* $Id: pgdatabase.h,v 1.11 2001/05/09 17:46:11 momjian Exp $
1818
*
1919
*-------------------------------------------------------------------------
2020
*/
@@ -51,8 +51,8 @@ class PgDatabase : public PgConnection {
5151
int FieldNum(const char* field_name) const;
5252
Oid FieldType(int field_num) const;
5353
Oid FieldType(const char* field_name) const;
54-
short FieldSize(int field_num) const;
55-
short FieldSize(const char* field_name) const;
54+
int FieldSize(int field_num) const;
55+
int FieldSize(const char* field_name) const;
5656
const char* GetValue(size_type tup_num, int field_num) const;
5757
const char* GetValue(size_type tup_num, const char* field_name) const;
5858
bool GetIsNull(size_type tup_num, int field_num) const;

0 commit comments

Comments
 (0)