|
1 | 1 | <!--
|
2 | 2 | Documentation of the system catalogs, directed toward PostgreSQL developers
|
3 |
| - $Header: /cvsroot/pgsql/doc/src/sgml/catalogs.sgml,v 2.69 2003/04/15 13:23:35 petere Exp $ |
| 3 | + $Header: /cvsroot/pgsql/doc/src/sgml/catalogs.sgml,v 2.70 2003/05/08 22:19:55 tgl Exp $ |
4 | 4 | -->
|
5 | 5 |
|
6 | 6 | <chapter id="catalogs">
|
|
3315 | 3315 | <para>
|
3316 | 3316 | The catalog <structname>pg_type</structname> stores information about data types. Base types
|
3317 | 3317 | (scalar types) are created with <command>CREATE TYPE</command>.
|
3318 |
| - A complex type is automatically created for each table in the database, to |
| 3318 | + A composite type is automatically created for each table in the database, to |
3319 | 3319 | represent the row structure of the table. It is also possible to create
|
3320 |
| - complex types with <command>CREATE TYPE AS</command> and |
| 3320 | + composite types with <command>CREATE TYPE AS</command> and |
3321 | 3321 | derived types with <command>CREATE DOMAIN</command>.
|
3322 | 3322 | </para>
|
3323 | 3323 |
|
|
3378 | 3378 | <entry>
|
3379 | 3379 | <structfield>typbyval</structfield> determines whether internal
|
3380 | 3380 | routines pass a value of this type by value or by reference.
|
3381 |
| - Only <type>char</type>, <type>short</type>, and |
3382 |
| - <type>int</type> equivalent items can be passed by value, so if |
3383 |
| - the type is not 1, 2, or 4 bytes long, |
3384 |
| - <productname>PostgreSQL</> does not have |
3385 |
| - the option of passing by value and so |
3386 |
| - <structfield>typbyval</structfield> had better be false. |
| 3381 | + <structfield>typbyval</structfield> had better be false if |
| 3382 | + <structfield>typlen</structfield> is not 1, 2, or 4 (or 8 on machines |
| 3383 | + where Datum is 8 bytes). |
3387 | 3384 | Variable-length types are always passed by reference. Note that
|
3388 | 3385 | <structfield>typbyval</structfield> can be false even if the
|
3389 | 3386 | length would allow pass-by-value; this is currently true for
|
|
3397 | 3394 | <entry></entry>
|
3398 | 3395 | <entry>
|
3399 | 3396 | <structfield>typtype</structfield> is <literal>b</literal> for
|
3400 |
| - a base type, <literal>c</literal> for a complex type (i.e., |
| 3397 | + a base type, <literal>c</literal> for a composite type (i.e., |
3401 | 3398 | a table's row type), <literal>d</literal> for a derived type (i.e.,
|
3402 | 3399 | a domain), or <literal>p</literal> for a pseudo-type. See also
|
3403 | 3400 | <structfield>typrelid</structfield>
|
|
3431 | 3428 | <entry><type>oid</type></entry>
|
3432 | 3429 | <entry><literal>pg_class.oid</literal></entry>
|
3433 | 3430 | <entry>
|
3434 |
| - If this is a complex type (see |
| 3431 | + If this is a composite type (see |
3435 | 3432 | <structfield>typtype</structfield>), then this column points to
|
3436 | 3433 | the <structname>pg_class</structname> entry that defines the
|
3437 | 3434 | corresponding table. (For a free-standing composite type, the
|
|
3468 | 3465 | <entry><structfield>typinput</structfield></entry>
|
3469 | 3466 | <entry><type>regproc</type></entry>
|
3470 | 3467 | <entry><literal>pg_proc.oid</literal></entry>
|
3471 |
| - <entry>Input conversion function</entry> |
| 3468 | + <entry>Input conversion function (text format)</entry> |
3472 | 3469 | </row>
|
3473 | 3470 |
|
3474 | 3471 | <row>
|
3475 | 3472 | <entry><structfield>typoutput</structfield></entry>
|
3476 | 3473 | <entry><type>regproc</type></entry>
|
3477 | 3474 | <entry><literal>pg_proc.oid</literal></entry>
|
3478 |
| - <entry>Output conversion function</entry> |
| 3475 | + <entry>Output conversion function (text format)</entry> |
| 3476 | + </row> |
| 3477 | + |
| 3478 | + <row> |
| 3479 | + <entry><structfield>typreceive</structfield></entry> |
| 3480 | + <entry><type>regproc</type></entry> |
| 3481 | + <entry><literal>pg_proc.oid</literal></entry> |
| 3482 | + <entry>Input conversion function (binary format), or 0 if none</entry> |
| 3483 | + </row> |
| 3484 | + |
| 3485 | + <row> |
| 3486 | + <entry><structfield>typsend</structfield></entry> |
| 3487 | + <entry><type>regproc</type></entry> |
| 3488 | + <entry><literal>pg_proc.oid</literal></entry> |
| 3489 | + <entry>Output conversion function (binary format), or 0 if none</entry> |
3479 | 3490 | </row>
|
3480 | 3491 |
|
3481 | 3492 | <row>
|
|
0 commit comments