Re: define type_transform to new user defined type - Mailing list pgsql-hackers

From Tom Lane
Subject Re: define type_transform to new user defined type
Date
Msg-id 31580.1393362706@sss.pgh.pa.us
Whole thread Raw
In response to define type_transform to new user defined type  (Mohsen SM <mohsensoodkhah@gmail.com>)
Responses Re: define type_transform to new user defined type
List pgsql-hackers
Mohsen SM <mohsensoodkhah@gmail.com> writes:
>  I want to create new type that is similar to varchar.
> its size is variable.
> I use CREATE TYPE query.
> I define for that type this functions:
> 1-typein
> 2-typeoute
> 3-typemodify_input
> 4-typemodify_output
> 5-type_transform
> I can define 1 to 4 functions in CREATE TYPE
> but I can't define type_transform for that type. how did I can define
> type_transform for that type?

There's no such thing as a "type transform".  There are transforms
associated with functions ... unfortunately, there's not currently
any provision for defining those at the SQL level.  You could poke
an entry into pg_proc.protransform if you're desperate enough.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Patch: show relation and tuple infos of a lock to acquire
Next
From: Peter Eisentraut
Date:
Subject: Re: [bug fix or improvement?] Correctly place DLLs for ECPG apps in bin folder