Re: automatic value conversion
| От | Tom Lane |
|---|---|
| Тема | Re: automatic value conversion |
| Дата | |
| Msg-id | 7471.1174759711@sss.pgh.pa.us обсуждение |
| Ответ на | automatic value conversion (Sebastian Boehm <pg@seb.exse.net>) |
| Ответы |
Re: automatic value conversion
|
| Список | pgsql-general |
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
В списке pgsql-general по дате отправления: