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

Commitb0546a2

Browse files
committed
Fix libpq++'s FieldSize to return int, not short.
1 parent9668b94 commitb0546a2

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-
shortPgDatabase::FieldSize(int field_num)const
109+
intPgDatabase::FieldSize(int field_num)const
110110
{
111111
returnPQfsize(pgResult, field_num);
112112
}
113113

114114

115-
shortPgDatabase::FieldSize(constchar* field_name)const
115+
intPgDatabase::FieldSize(constchar* field_name)const
116116
{
117117
returnPQfsize(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
intFieldNum(constchar* field_name)const;
5252
OidFieldType(int field_num)const;
5353
OidFieldType(constchar* field_name)const;
54-
shortFieldSize(int field_num)const;
55-
shortFieldSize(constchar* field_name)const;
54+
intFieldSize(int field_num)const;
55+
intFieldSize(constchar* field_name)const;
5656
constchar*GetValue(size_type tup_num,int field_num)const;
5757
constchar*GetValue(size_type tup_num,constchar* field_name)const;
5858
boolGetIsNull(size_type tup_num,int field_num)const;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp