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
7771436e
Commit
7771436e
authored
Jul 11, 2001
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
> > Put encode() into base system. Used part of Alex' patch
> > for docs, hope he does not mind ;) Marko Kreen
parent
4051bce2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
5 deletions
+40
-5
doc/src/sgml/func.sgml
doc/src/sgml/func.sgml
+29
-1
src/backend/utils/adt/Makefile
src/backend/utils/adt/Makefile
+2
-2
src/include/catalog/pg_proc.h
src/include/catalog/pg_proc.h
+6
-1
src/include/utils/builtins.h
src/include/utils/builtins.h
+3
-1
No files found.
doc/src/sgml/func.sgml
View file @
7771436e
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/func.sgml,v 1.6
3 2001/07/03 02:42:18
momjian Exp $ -->
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/func.sgml,v 1.6
4 2001/07/11 22:14:01
momjian Exp $ -->
<chapter id="functions">
<title>Functions and Operators</title>
...
...
@@ -1051,6 +1051,34 @@
<entry>translate('12345', '14', 'ax')</entry>
<entry>a23x5</entry>
</row>
<row>
<entry>
encode(<parameter>data</parameter> <type>bytea</type>,
<parameter>type</parameter> <type>text</type>)
</entry>
<entry><type>text</type></entry>
<entry>
Encodes binary data to ascii-only representation. Supported
types are: 'base64', 'hex'.
</entry>
<entry>encode('123\\000\\001', 'base64')</entry>
<entry>MTIzAAE=</entry>
</row>
<row>
<entry>
decode(<parameter>string</parameter> <type>text</type>,
<parameter>type</parameter> <type>text</type>)
</entry>
<entry><type>bytea</type></entry>
<entry>
Decodes binary data from <parameter>string</parameter> previously
encoded with encode(). Parameter type is same as in encode().
</entry>
<entry>decode('MTIzAAE=', 'base64')</entry>
<entry>123\000\001</entry>
</row>
</tbody>
</tgroup>
...
...
src/backend/utils/adt/Makefile
View file @
7771436e
#
# Makefile for utils/adt
#
# $Header: /cvsroot/pgsql/src/backend/utils/adt/Makefile,v 1.
49 2001/06/22 19:16:23 wieck
Exp $
# $Header: /cvsroot/pgsql/src/backend/utils/adt/Makefile,v 1.
50 2001/07/11 22:14:02 momjian
Exp $
#
subdir
=
src/backend/utils/adt
...
...
@@ -24,7 +24,7 @@ OBJS = acl.o arrayfuncs.o arrayutils.o bool.o cash.o char.o \
tid.o timestamp.o varbit.o varchar.o varlena.o version.o
\
network.o mac.o inet_net_ntop.o inet_net_pton.o
\
ri_triggers.o pg_lzcompress.o pg_locale.o formatting.o
\
ascii.o quote.o pgstatfuncs.o
ascii.o quote.o pgstatfuncs.o
encode.o
all
:
SUBSYS.o
...
...
src/include/catalog/pg_proc.h
View file @
7771436e
...
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_proc.h,v 1.19
5 2001/06/22 19:16:24 wieck
Exp $
* $Id: pg_proc.h,v 1.19
6 2001/07/11 22:14:02 momjian
Exp $
*
* NOTES
* The script catalog/genbki.sh reads this file and generates .bki
...
...
@@ -2684,6 +2684,11 @@ DESCR("Statistics: Blocks fetched for database");
DATA
(
insert
OID
=
1945
(
pg_stat_get_db_blocks_hit
PGUID
12
f
t
t
t
1
f
20
"26"
100
0
0
100
pg_stat_get_db_blocks_hit
-
));
DESCR
(
"Statistics: Block found in cache for database"
);
DATA
(
insert
OID
=
1946
(
encode
PGUID
12
f
t
t
t
2
f
25
"17 25"
100
0
0
100
binary_encode
-
));
DESCR
(
"Convert bytea value into some ascii-only text string"
);
DATA
(
insert
OID
=
1947
(
decode
PGUID
12
f
t
t
t
2
f
17
"25 25"
100
0
0
100
binary_decode
-
));
DESCR
(
"Convert ascii-encoded text string into bytea value"
);
/*
* prototypes for functions pg_proc.c
*/
...
...
src/include/utils/builtins.h
View file @
7771436e
...
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: builtins.h,v 1.15
6 2001/06/25 21:11:45 tgl
Exp $
* $Id: builtins.h,v 1.15
7 2001/07/11 22:14:03 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -409,6 +409,8 @@ extern Datum byteaGetByte(PG_FUNCTION_ARGS);
extern
Datum
byteaGetBit
(
PG_FUNCTION_ARGS
);
extern
Datum
byteaSetByte
(
PG_FUNCTION_ARGS
);
extern
Datum
byteaSetBit
(
PG_FUNCTION_ARGS
);
extern
Datum
binary_encode
(
PG_FUNCTION_ARGS
);
extern
Datum
binary_decode
(
PG_FUNCTION_ARGS
);
/* version.c */
extern
Datum
pgsql_version
(
PG_FUNCTION_ARGS
);
...
...
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