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
53026db7
Commit
53026db7
authored
Dec 08, 1997
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More VARHDRSZ additions.
parent
bec35da8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
13 deletions
+13
-13
src/backend/access/common/printtup.c
src/backend/access/common/printtup.c
+2
-2
src/backend/libpq/be-fsstubs.c
src/backend/libpq/be-fsstubs.c
+4
-4
src/backend/utils/adt/varlena.c
src/backend/utils/adt/varlena.c
+7
-7
No files found.
src/backend/access/common/printtup.c
View file @
53026db7
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/common/printtup.c,v 1.
19 1997/12/06 22:56:20
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/access/common/printtup.c,v 1.
20 1997/12/08 04:42:43
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -265,7 +265,7 @@ printtup_internal(HeapTuple tuple, TupleDesc typeinfo)
/* variable length, assume a varlena structure */
len
=
VARSIZE
(
attr
)
-
VARHDRSZ
;
pq_putint
(
len
,
sizeof
(
int32
)
);
pq_putint
(
len
,
VARHDRSZ
);
pq_putnchar
(
VARDATA
(
attr
),
len
);
#ifdef IPORTAL_DEBUG
{
...
...
src/backend/libpq/be-fsstubs.c
View file @
53026db7
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/libpq/be-fsstubs.c,v 1.1
6 1997/10/25 01:09:16
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/libpq/be-fsstubs.c,v 1.1
7 1997/12/08 04:42:45
momjian Exp $
*
* NOTES
* This should be moved to a more appropriate place. It is here
...
...
@@ -227,9 +227,9 @@ loread(int fd, int len)
struct
varlena
*
retval
;
int
totalread
=
0
;
retval
=
(
struct
varlena
*
)
palloc
(
sizeof
(
int32
)
+
len
);
retval
=
(
struct
varlena
*
)
palloc
(
VARHDRSZ
+
len
);
totalread
=
lo_read
(
fd
,
VARDATA
(
retval
),
len
);
VARSIZE
(
retval
)
=
totalread
+
sizeof
(
int32
)
;
VARSIZE
(
retval
)
=
totalread
+
VARHDRSZ
;
return
retval
;
}
...
...
@@ -240,7 +240,7 @@ lowrite(int fd, struct varlena * wbuf)
int
totalwritten
;
int
bytestowrite
;
bytestowrite
=
VARSIZE
(
wbuf
)
-
sizeof
(
int32
)
;
bytestowrite
=
VARSIZE
(
wbuf
)
-
VARHDRSZ
;
totalwritten
=
lo_write
(
fd
,
VARDATA
(
wbuf
),
bytestowrite
);
return
totalwritten
;
}
...
...
src/backend/utils/adt/varlena.c
View file @
53026db7
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.2
3 1997/12/06 22:57:15
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.2
4 1997/12/08 04:42:48
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -59,7 +59,7 @@ byteain(char *inputText)
elog
(
WARN
,
"Bad input string for type bytea"
);
}
tp
=
inputText
;
byte
+=
sizeof
(
int32
);
/* varlena? */
byte
+=
VARHDRSZ
;
result
=
(
struct
varlena
*
)
palloc
(
byte
);
result
->
vl_len
=
byte
;
/* varlena? */
rp
=
result
->
vl_dat
;
...
...
@@ -88,11 +88,11 @@ shove_bytes(unsigned char *stuff, int len)
{
struct
varlena
*
result
;
result
=
(
struct
varlena
*
)
palloc
(
len
+
sizeof
(
int32
)
);
result
=
(
struct
varlena
*
)
palloc
(
len
+
VARHDRSZ
);
result
->
vl_len
=
len
;
memmove
(
result
->
vl_dat
,
stuff
+
sizeof
(
int32
)
,
len
-
sizeof
(
int32
)
);
stuff
+
VARHDRSZ
,
len
-
VARHDRSZ
);
return
(
result
);
}
...
...
@@ -126,7 +126,7 @@ byteaout(struct varlena * vlena)
}
vp
=
vlena
->
vl_dat
;
len
=
1
;
/* empty string has 1 char */
for
(
i
=
vlena
->
vl_len
-
sizeof
(
int32
);
i
!=
0
;
i
--
,
vp
++
)
/* varlena? */
for
(
i
=
vlena
->
vl_len
-
VARHDRSZ
;
i
!=
0
;
i
--
,
vp
++
)
if
(
*
vp
==
'\\'
)
len
+=
2
;
else
if
(
isascii
(
*
vp
)
&&
isprint
(
*
vp
))
...
...
@@ -135,7 +135,7 @@ byteaout(struct varlena * vlena)
len
+=
VARHDRSZ
;
rp
=
result
=
(
char
*
)
palloc
(
len
);
vp
=
vlena
->
vl_dat
;
for
(
i
=
vlena
->
vl_len
-
sizeof
(
int32
);
i
!=
0
;
i
--
)
/* varlena? */
for
(
i
=
vlena
->
vl_len
-
VARHDRSZ
;
i
!=
0
;
i
--
)
if
(
*
vp
==
'\\'
)
{
vp
++
;
...
...
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