aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2002-08-24 15:00:47 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2002-08-24 15:00:47 +0000
commit976246cc7e4d8b673fc62fe6daa61c76d94af1af (patch)
treeb61ea3f5bbd8fa025587754bc90c3fd43889337c /doc/src
parentcf4d885c67744637d82f6fec657e8205578c5905 (diff)
downloadpostgresql-976246cc7e4d8b673fc62fe6daa61c76d94af1af.tar.gz
postgresql-976246cc7e4d8b673fc62fe6daa61c76d94af1af.zip
The cstring datatype can now be copied, passed around, etc. The typlen
value '-2' is used to indicate a variable-width type whose width is computed as strlen(datum)+1. Everything that looks at typlen is updated except for array support, which Joe Conway is working on; at the moment it wouldn't work to try to create an array of cstring.
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/catalogs.sgml12
1 files changed, 9 insertions, 3 deletions
diff --git a/doc/src/sgml/catalogs.sgml b/doc/src/sgml/catalogs.sgml
index e62493b5257..58027891c82 100644
--- a/doc/src/sgml/catalogs.sgml
+++ b/doc/src/sgml/catalogs.sgml
@@ -1,6 +1,6 @@
<!--
Documentation of the system catalogs, directed toward PostgreSQL developers
- $Header: /cvsroot/pgsql/doc/src/sgml/catalogs.sgml,v 2.53 2002/08/13 17:22:08 petere Exp $
+ $Header: /cvsroot/pgsql/doc/src/sgml/catalogs.sgml,v 2.54 2002/08/24 15:00:45 tgl Exp $
-->
<chapter id="catalogs">
@@ -3173,7 +3173,13 @@
<entry>typlen</entry>
<entry><type>int2</type></entry>
<entry></entry>
- <entry>Length of the storage representation of the type, -1 if variable length</entry>
+ <entry>
+ For a fixed-size type, <structfield>typlen</structfield> is the number
+ of bytes in the internal representation of the type. But for a
+ variable-length type, <structfield>typlen</structfield> is negative.
+ -1 indicates a <quote>varlena</> type (one that has a length word),
+ -2 indicates a null-terminated C string.
+ </entry>
</row>
<row>
@@ -3325,7 +3331,7 @@
<entry><type>char</type></entry>
<entry></entry>
<entry><para>
- <structfield>typstorage</structfield> tells for variable-length
+ <structfield>typstorage</structfield> tells for varlena
types (those with <structfield>typlen</structfield> = -1) if
the type is prepared for toasting and what the default strategy
for attributes of this type should be.