1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
10 HREF="mailto:pgsql-docs@postgresql.org"><LINK
12 TITLE="PostgreSQL 7.4.1 Documentation"
13 HREF="index.html"><LINK
16 HREF="datatype.html"><LINK
18 TITLE="Object Identifier Types"
19 HREF="datatype-oid.html"><LINK
21 TITLE="Functions and Operators"
22 HREF="functions.html"><LINK
25 HREF="stylesheet.css"><META
27 CONTENT="2003-12-22T03:48:47"></HEAD
33 SUMMARY="Header navigation table"
43 >PostgreSQL 7.4.1 Documentation</TH
51 HREF="datatype-oid.html"
67 >Chapter 8. Data Types</TD
95 NAME="DATATYPE-PSEUDO"
96 >8.12. Pseudo-Types</A
132 > type system contains a
133 number of special-purpose entries that are collectively called
137 >. A pseudo-type cannot be used as a
138 column data type, but it can be used to declare a function's
139 argument or result type. Each of the available pseudo-types is
140 useful in situations where a function's behavior does not
141 correspond to simply taking or returning a value of a specific
146 HREF="datatype-pseudo.html#DATATYPE-PSEUDOTYPES-TABLE"
154 NAME="DATATYPE-PSEUDOTYPES-TABLE"
158 >Table 8-20. Pseudo-Types</B
179 >Indicates that a function accepts any input data type whatever.</TD
188 >Indicates that a function accepts any array data type
190 HREF="extend-type-system.html#EXTEND-TYPES-POLYMORPHIC"
201 >Indicates that a function accepts any data type
203 HREF="extend-type-system.html#EXTEND-TYPES-POLYMORPHIC"
214 >Indicates that a function accepts or returns a null-terminated C string.</TD
223 >Indicates that a function accepts or returns a server-internal
230 >language_handler</TT
233 >A procedural language call handler is declared to return <TT
235 >language_handler</TT
245 >Identifies a function returning an unspecified row type.</TD
254 >A trigger function is declared to return <TT
266 >Indicates that a function returns no value.</TD
275 >An obsolete type name that formerly served all the above purposes.</TD
281 > Functions coded in C (whether built-in or dynamically loaded) may be
282 declared to accept or return any of these pseudo data types. It is up to
283 the function author to ensure that the function will behave safely
284 when a pseudo-type is used as an argument type.
287 > Functions coded in procedural languages may use pseudo-types only as
288 allowed by their implementation languages. At present the procedural
289 languages all forbid use of a pseudo-type as argument type, and allow
296 > as a result type (plus
300 > when the function is used as a trigger). Some also
301 support polymorphic functions using the types <TT
314 > pseudo-type is used to declare functions
315 that are meant only to be called internally by the database
316 system, and not by direct invocation in a <ACRONYM
320 query. If a function has at least one <TT
324 argument then it cannot be called from <ACRONYM
328 preserve the type safety of this restriction it is important to
329 follow this coding rule: do not create any function that is
330 declared to return <TT
333 > unless it has at least one
345 SUMMARY="Footer navigation table"
356 HREF="datatype-oid.html"
374 HREF="functions.html"
384 >Object Identifier Types</TD
398 >Functions and Operators</TD