Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
cebbaa1d
Commit
cebbaa1d
authored
14 years ago
by
Bruce Momjian
Browse files
Options
Downloads
Patches
Plain Diff
Back out libpq doc change; not ready yet.
parent
8e7af608
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
doc/src/sgml/libpq.sgml
+28
-18
28 additions, 18 deletions
doc/src/sgml/libpq.sgml
doc/src/sgml/release-9.0.sgml
+1
-2
1 addition, 2 deletions
doc/src/sgml/release-9.0.sgml
with
29 additions
and
20 deletions
doc/src/sgml/libpq.sgml
+
28
−
18
View file @
cebbaa1d
...
...
@@ -3385,17 +3385,15 @@ size_t PQescapeStringConn(PGconn *conn,
<listitem>
<para>
<function>PQescapeString</> is an older, deprecated version of
<function>PQescapeStringConn</>.
<synopsis>
size_t PQescapeString (char *to, const char *from, size_t length);
</synopsis>
</para>
<para>
The only difference from
<function>PQescapeString
Conn
</> is
that
<function>PQescapeString
</> does not take <structname>PGconn</>
or <parameter>error</> parameters.
<function>PQescapeString</> is
an older, deprecated version of
<function>PQescapeString
Conn</>; the difference is that it does
not take <parameter>conn</>
or <parameter>error</> parameters.
Because of this, it cannot adjust its behavior depending on the
connection properties (such as character encoding) and therefore
<emphasis>it might give the wrong results</>. Also, it has no way
...
...
@@ -3403,7 +3401,7 @@ size_t PQescapeString (char *to, const char *from, size_t length);
</para>
<para>
<function>PQescapeString</> can be used safely in
<function>PQescapeString</> can be used safely in
single-threaded
client programs that work with only one <productname>PostgreSQL</>
connection at a time (in this case it can find out what it needs to
know <quote>behind the scenes</>). In other contexts it is a security
...
...
@@ -3435,11 +3433,16 @@ unsigned char *PQescapeByteaConn(PGconn *conn,
</para>
<para>
Certain byte values must be escaped when used as part of a
<type>bytea</type> literal in an <acronym>SQL</acronym> statement.
<function>PQescapeByteaConn</function> escapes bytes using
either hex encoding or backslash escaping. See <xref
linkend="datatype-binary"> for more information.
Certain byte values <emphasis>must</emphasis> be escaped (but all
byte values <emphasis>can</emphasis> be escaped) when used as part
of a <type>bytea</type> literal in an <acronym>SQL</acronym>
statement. In general, to escape a byte, it is converted into the
three digit octal number equal to the octet value, and preceded by
usually two backslashes. The single quote (<literal>'</>) and backslash
(<literal>\</>) characters have special alternative escape
sequences. See <xref linkend="datatype-binary"> for more
information. <function>PQescapeByteaConn</function> performs this
operation, escaping only the minimally required bytes.
</para>
<para>
...
...
@@ -3496,13 +3499,20 @@ unsigned char *PQescapeBytea(const unsigned char *from,
<para>
The only difference from <function>PQescapeByteaConn</> is that
<function>PQescapeBytea</> does not take a <structname>PGconn</>
parameter. Because of this, <function>PQescapeBytea</> can
only be used safely in client programs that use a single
<productname>PostgreSQL</> connection at a time (in this case
it can find out what it needs to know <quote>behind the
scenes</>). It <emphasis>might give the wrong results</> if
used in programs that use multiple database connections (use
<function>PQescapeByteaConn</> in such cases).
parameter. Because of this, it cannot adjust its behavior
depending on the connection properties (in particular, whether
standard-conforming strings are enabled) and therefore
<emphasis>it might give the wrong results</>. Also, it has no
way to return an error message on failure.
</para>
<para>
<function>PQescapeBytea</> can be used safely in single-threaded
client programs that work with only one <productname>PostgreSQL</>
connection at a time (in this case it can find out what it needs
to know <quote>behind the scenes</>). In other contexts it is
a security hazard and should be avoided in favor of
<function>PQescapeByteaConn</>.
</para>
</listitem>
</varlistentry>
...
...
This diff is collapsed.
Click to expand it.
doc/src/sgml/release-9.0.sgml
+
1
−
2
View file @
cebbaa1d
...
...
@@ -2342,8 +2342,7 @@
whether hex or traditional format is used for <type>bytea</>
output. Libpq's <function>PQescapeByteaConn()</> function automatically
uses the hex format when connected to <productname>PostgreSQL</> 9.0
or newer servers. However, pre-9.0 libpq versions will not
correctly process hex format from newer servers.
or newer servers.
</para>
<para>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment