If you use a plpgsql function to select the row you want to validate,
it will make life much easier. Something like
...
$$
declare my_row a_row_type; is_ok integer;
begin select into my_row * from a_row_type where .... is_ok := my_a_validate(my_row); return is_ok;
$$
...
On Apr 4, 2007, at 1:01 AM, A. Kretschmer wrote:
> Because your function expects one parameter of your new type, you have
> to CAST your data into this type:
>
>
>
> test=# select * from my_a((1, 'foo', current_date)::a);
> my_a
> ------
> 1
> (1 row)
John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL