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

From Tom Lane
Subject Re: typmod is always -1
Date
Msg-id 28121.1237251420@sss.pgh.pa.us
Whole thread Raw
In response to typmod is always -1  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: typmod is always -1  (Pavel Stehule <pavel.stehule@gmail.com>)
typmod is always -1  (Chapman Flack <chap@anastigmatix.net>)
List pgsql-hackers
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.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Problem with accesing Oracle from plperlu functionwhen using remote pg client.
Next
From: Tom Lane
Date:
Subject: Re: small but useful patches for text search