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

Commita7fd74e

Browse files
committed
Update protocol doc to emphasize that backend can return
arbitrarily long strings, and frontends should cope gracefully. Goesalong with long query and long error message changes...
1 parentb399805 commita7fd74e

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

‎doc/src/sgml/protocol.sgml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -657,17 +657,20 @@ This section describes the base data types used in messages.
657657
<ListItem>
658658
<Para>
659659
A conventional C '\0' terminated string with no length
660-
limitation. A frontend should always read the full string
661-
even though it may have to discard characters if its buffers
662-
aren't big enough.
660+
limitation.
661+
If <Replaceable>s</Replaceable> is specified it is the literal value.
662+
Eg. String, String("user").
663+
</Para>
664+
663665
<Note>
664666
<Para>
665-
Is 8193 bytes the largest allowed size?
667+
<Emphasis>There is no predefined limit</Emphasis> on the length of a string
668+
that can be returned by the backend. Good coding strategy for a frontend
669+
is to use an expandable buffer so that anything that fits in memory can be
670+
accepted. If that's not feasible, read the full string and discard trailing
671+
characters that don't fit into your fixed-size buffer.
666672
</Para>
667673
</Note>
668-
If <Replaceable>s</Replaceable> is specified it is the literal value.
669-
Eg. String, String("user").
670-
</Para>
671674
</ListItem>
672675
</VarListEntry>
673676
<VarListEntry>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp