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
3f03f74f
Commit
3f03f74f
authored
Jan 10, 2000
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update int28out and out8out and _in_ functions to handle trailing zeros
properly.
parent
752314eb
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
60 additions
and
38 deletions
+60
-38
src/backend/utils/adt/int.c
src/backend/utils/adt/int.c
+25
-14
src/backend/utils/adt/oid.c
src/backend/utils/adt/oid.c
+21
-11
src/interfaces/ecpg/lib/Makefile.in
src/interfaces/ecpg/lib/Makefile.in
+2
-2
src/interfaces/ecpg/preproc/Makefile
src/interfaces/ecpg/preproc/Makefile
+1
-1
src/interfaces/libpgeasy/Makefile.in
src/interfaces/libpgeasy/Makefile.in
+2
-2
src/interfaces/libpgtcl/Makefile.in
src/interfaces/libpgtcl/Makefile.in
+2
-2
src/interfaces/libpq++/Makefile.in
src/interfaces/libpq++/Makefile.in
+2
-2
src/interfaces/libpq/Makefile.in
src/interfaces/libpq/Makefile.in
+2
-2
src/interfaces/odbc/Version.mk
src/interfaces/odbc/Version.mk
+2
-2
src/tools/RELEASE_CHANGES
src/tools/RELEASE_CHANGES
+1
-0
No files found.
src/backend/utils/adt/int.c
View file @
3f03f74f
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/int.c,v 1.
29 2000/01/10 05:23:47
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/int.c,v 1.
30 2000/01/10 15:41:26
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -29,6 +29,7 @@
* fix me when we figure out what we want to do about ANSIfication...
*/
#include <ctype.h>
#include "postgres.h"
#ifdef HAVE_LIMITS_H
#include <limits.h>
...
...
@@ -90,10 +91,15 @@ int28in(char *intString)
{
if
(
sscanf
(
intString
,
"%hd"
,
&
result
[
slot
])
!=
1
)
break
;
do
while
(
*
intString
&&
isspace
(
*
intString
))
intString
++
;
while
(
*
intString
&&
!
isspace
(
*
intString
))
intString
++
;
while
(
*
intString
&&
*
intString
!=
' '
)
}
while
(
*
intString
&&
isspace
(
*
intString
))
intString
++
;
if
(
*
intString
)
elog
(
ERROR
,
"int28 value has too many values"
);
while
(
slot
<
INDEX_MAX_KEYS
)
result
[
slot
++
]
=
0
;
...
...
@@ -104,31 +110,36 @@ int28in(char *intString)
* int28out - converts internal form to "num num ..."
*/
char
*
int28out
(
int16
*
shs
)
int28out
(
int16
*
int2Array
)
{
int
num
;
int16
*
sp
;
int
num
,
maxnum
;
char
*
rp
;
char
*
result
;
if
(
shs
==
NULL
)
if
(
int2Array
==
NULL
)
{
result
=
(
char
*
)
palloc
(
2
);
result
[
0
]
=
'-'
;
result
[
1
]
=
'\0'
;
return
result
;
}
rp
=
result
=
(
char
*
)
palloc
(
INDEX_MAX_KEYS
*
7
);
/* assumes sign, 5 digits, ' ' */
sp
=
shs
;
for
(
num
=
INDEX_MAX_KEYS
;
num
!=
0
;
num
--
)
/* find last non-zero value in vector */
for
(
maxnum
=
INDEX_MAX_KEYS
-
1
;
maxnum
>=
0
;
maxnum
--
)
if
(
int2Array
[
maxnum
]
!=
0
)
break
;
/* assumes sign, 5 digits, ' ' */
rp
=
result
=
(
char
*
)
palloc
(
maxnum
*
7
+
1
);
for
(
num
=
0
;
num
<=
maxnum
;
num
++
)
{
itoa
(
*
sp
++
,
rp
);
if
(
num
!=
0
)
*
rp
++
=
' '
;
ltoa
(
int2Array
[
num
],
rp
);
while
(
*++
rp
!=
'\0'
)
;
*
rp
++
=
' '
;
}
*
--
rp
=
'\0'
;
*
rp
=
'\0'
;
return
result
;
}
...
...
src/backend/utils/adt/oid.c
View file @
3f03f74f
...
...
@@ -7,12 +7,13 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/oid.c,v 1.3
0 2000/01/10 05:23:47
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/oid.c,v 1.3
1 2000/01/10 15:41:26
momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include <ctype.h>
#include "postgres.h"
#include "utils/builtins.h"
...
...
@@ -41,10 +42,15 @@ oid8in(char *oidString)
{
if
(
sscanf
(
oidString
,
"%u"
,
&
result
[
slot
])
!=
1
)
break
;
do
while
(
*
oidString
&&
isspace
(
*
oidString
))
oidString
++
;
while
(
*
oidString
&&
!
isspace
(
*
oidString
))
oidString
++
;
while
(
*
oidString
&&
*
oidString
!=
' '
)
}
while
(
*
oidString
&&
isspace
(
*
oidString
))
oidString
++
;
if
(
*
oidString
)
elog
(
ERROR
,
"oid8 value has too many values"
);
while
(
slot
<
INDEX_MAX_KEYS
)
result
[
slot
++
]
=
0
;
...
...
@@ -57,8 +63,7 @@ oid8in(char *oidString)
char
*
oid8out
(
Oid
*
oidArray
)
{
int
num
;
Oid
*
sp
;
int
num
,
maxnum
;
char
*
rp
;
char
*
result
;
...
...
@@ -70,17 +75,22 @@ oid8out(Oid *oidArray)
return
result
;
}
/* find last non-zero value in vector */
for
(
maxnum
=
INDEX_MAX_KEYS
-
1
;
maxnum
>=
0
;
maxnum
--
)
if
(
oidArray
[
maxnum
]
!=
0
)
break
;
/* assumes sign, 10 digits, ' ' */
rp
=
result
=
(
char
*
)
palloc
(
INDEX_MAX_KEYS
*
12
);
sp
=
oidArray
;
for
(
num
=
INDEX_MAX_KEYS
;
num
!=
0
;
num
--
)
rp
=
result
=
(
char
*
)
palloc
(
maxnum
*
12
+
1
);
for
(
num
=
0
;
num
<=
maxnum
;
num
++
)
{
ltoa
(
*
sp
++
,
rp
);
if
(
num
!=
0
)
*
rp
++
=
' '
;
ltoa
(
oidArray
[
num
],
rp
);
while
(
*++
rp
!=
'\0'
)
;
*
rp
++
=
' '
;
}
*
--
rp
=
'\0'
;
*
rp
=
'\0'
;
return
result
;
}
...
...
src/interfaces/ecpg/lib/Makefile.in
View file @
3f03f74f
...
...
@@ -6,13 +6,13 @@
# Copyright (c) 1994, Regents of the University of California
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/Makefile.in,v 1.5
4 1999/12/16 06:53:10 meskes
Exp $
# $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/Makefile.in,v 1.5
5 2000/01/10 15:41:27 momjian
Exp $
#
#-------------------------------------------------------------------------
NAME
=
ecpg
SO_MAJOR_VERSION
=
3
SO_MINOR_VERSION
=
0.9
SO_MINOR_VERSION
=
1.0
SRCDIR
=
@top_srcdir@
include
$(SRCDIR)/Makefile.global
...
...
src/interfaces/ecpg/preproc/Makefile
View file @
3f03f74f
...
...
@@ -2,7 +2,7 @@ SRCDIR= ../../..
include
$(SRCDIR)/Makefile.global
MAJOR_VERSION
=
2
MINOR_VERSION
=
6
MINOR_VERSION
=
7
PATCHLEVEL
=
14
CFLAGS
+=
-I
../include
-DMAJOR_VERSION
=
$(MAJOR_VERSION)
\
...
...
src/interfaces/libpgeasy/Makefile.in
View file @
3f03f74f
...
...
@@ -4,13 +4,13 @@
# Makefile for pgeasy library
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/interfaces/libpgeasy/Attic/Makefile.in,v 1.
4 1999/12/16 01:25:16
momjian Exp $
# $Header: /cvsroot/pgsql/src/interfaces/libpgeasy/Attic/Makefile.in,v 1.
5 2000/01/10 15:41:28
momjian Exp $
#
#-------------------------------------------------------------------------
NAME
=
pgeasy
SO_MAJOR_VERSION
=
2
SO_MINOR_VERSION
=
0
SO_MINOR_VERSION
=
1
SRCDIR
=
@top_srcdir@
include
$(SRCDIR)/Makefile.global
...
...
src/interfaces/libpgtcl/Makefile.in
View file @
3f03f74f
...
...
@@ -6,13 +6,13 @@
# Copyright (c) 1994, Regents of the University of California
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/Makefile.in,v 1.3
7 1999/12/16 01:25:17
momjian Exp $
# $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/Makefile.in,v 1.3
8 2000/01/10 15:41:29
momjian Exp $
#
#-------------------------------------------------------------------------
NAME
=
pgtcl
SO_MAJOR_VERSION
=
2
SO_MINOR_VERSION
=
0
SO_MINOR_VERSION
=
1
SRCDIR
=
@top_srcdir@
include
$(SRCDIR)/Makefile.global
...
...
src/interfaces/libpq++/Makefile.in
View file @
3f03f74f
...
...
@@ -6,13 +6,13 @@
# Copyright (c) 1994, Regents of the University of California
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/Makefile.in,v 1.
19 1999/12/16 01:25:20
momjian Exp $
# $Header: /cvsroot/pgsql/src/interfaces/libpq++/Attic/Makefile.in,v 1.
20 2000/01/10 15:41:31
momjian Exp $
#
#-------------------------------------------------------------------------
NAME
=
pq++
SO_MAJOR_VERSION
=
3
SO_MINOR_VERSION
=
0
SO_MINOR_VERSION
=
1
SRCDIR
=
@top_srcdir@
include
$(SRCDIR)/Makefile.global
...
...
src/interfaces/libpq/Makefile.in
View file @
3f03f74f
...
...
@@ -6,13 +6,13 @@
# Copyright (c) 1994, Regents of the University of California
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/interfaces/libpq/Attic/Makefile.in,v 1.5
0 1999/12/16 01:25:19
momjian Exp $
# $Header: /cvsroot/pgsql/src/interfaces/libpq/Attic/Makefile.in,v 1.5
1 2000/01/10 15:41:30
momjian Exp $
#
#-------------------------------------------------------------------------
NAME
=
pq
SO_MAJOR_VERSION
=
2
SO_MINOR_VERSION
=
0
SO_MINOR_VERSION
=
1
SRCDIR
=
@top_srcdir@
include
$(SRCDIR)/Makefile.global
...
...
src/interfaces/odbc/Version.mk
View file @
3f03f74f
VERSION
=
0.2
5
VERSION
=
0.2
6
EXTVER
=
.0
SO_MAJOR_VERSION
=
0
SO_MINOR_VERSION
=
2
5
SO_MINOR_VERSION
=
2
6
src/tools/RELEASE_CHANGES
View file @
3f03f74f
...
...
@@ -17,3 +17,4 @@ update documentation
psql help in psqlHelp.c
man pages
sgml docs
update VERSION numbers of interfaces
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