Search Postgresql Archives

Re: automatic value conversion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sebastian Boehm <pg@xxxxxxxxxxxx> 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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux