Sebastian Boehm <pg@seb.exse.net> writes:
> the functions function_in and function_out should be called
> automatically on select or insert / update.
> How can I change the table definition to use function_in and
> function_out transparently for me (as if the table had a text colum)
You would have to create a new data type and make those functions
be the I/O functions of the type.
It sorta looks to me like you are reinventing the concept of an ENUM
column. This has been done before --- see enumkit
http://archives.postgresql.org/pgsql-hackers/2005-10/msg01243.php
as well as the currently pending patch to integrate the feature
into core Postgres.
regards, tom lane