
user defined type problem
Hi all,
I'm trying to create a user defined type (dir_type) to map a set of strings to a
set of numbers
eg:
'entrata' => 0
'uscita' => 1
'anyotherstring' => ERROR
so my users can write something like this:
direzione is a dir_type
insert into foo(direzione) values('entrata')
or
select * from foo where direzione='entrata'
you can check
http://www.***.com/
for the sql commands
and
http://www.***.com/
for the shared library code
the functions dir_toint() and dir_tochar() work properly:
eg select dir_toint('entrata');
but if I try to select
dir_eqop('entrata','entrata')
the backend crashses
checking the log I notice that the backend crash
after the second elog() in dir_toint()
any ideas?
thank you