Re: typmod is always -1 - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: typmod is always -1
Date
Msg-id 162867790903162230y5223f5p6fc858938f8ee65a@mail.gmail.com
Whole thread Raw
In response to Re: typmod is always -1  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
2009/3/17 Tom Lane <tgl@sss.pgh.pa.us>:
> Pavel Stehule <pavel.stehule@gmail.com> writes:
>> I have a problem - every call of mvarcharin is with typmod = -1.
>
> Sure your typmod_in function works?
>
> Also, there are a bunch of scenarios where we rely on a cast function to
> apply the typmod rather than passing it to the input function initially.
> I'm not sure if the particular case you're checking here falls into that
> category, but you definitely should have a "length conversion cast"
> function in pg_cast if you expect to do anything useful with typmod.

thank you. It is it.

What I understand, this behave is little bit confusing and undocumented :(

regards
Pavel Stehule

>
>                        regards, tom lane
>


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: small but useful patches for text search
Next
From: Heikki Linnakangas
Date:
Subject: Re: Remaining items for 8.4 (was Re: Updates of SE-PostgreSQL 8.4devel patches (r1710))