> > test=# \df iso8859_1_to_utf8
> >                                   List of functions
> >  Result data type |   Schema   |       Name        |       Argument data types     
>  
> > 
>------------------+------------+-------------------+---------------------------------
> >  integer          | pg_catalog | iso8859_1_to_utf8 | integer, integer, -, -, 
>integer
> 
> Right, that's what they are now, but what do the "-" entries really
> mean?  Also, are the "integer" args and result truthful, or do they
> really mean something else?

They are like:

 * conv_proc(
 *              INTEGER,        -- source encoding id
 *              INTEGER,        -- destination encoding id
 *              OPAQUE,         -- source string (null terminated C string)
 *              OPAQUE,         -- destination string (null terminated C string)
 *              INTEGER         -- source string length

For the second and third argument they are actually treated as:

unsigned char *src = PG_GETARG_CSTRING(2);
unsigned char *dest = PG_GETARG_CSTRING(3);

The first one is an input parameter(source string), and second one is
an output parameter(destination string). The caller of this function
is responsible for allocationg enough memory for destination string.

The returned integer is actually dummy. The function always returns 1.
--
Tatsuo Ishii

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Reply via email to