Re: typmod is always -1

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: typmod is always -1
Date: 2009-03-17 00:57:00
Message-ID: 28121.1237251420@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Pavel Stehule <pavel(dot)stehule(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-03-17 01:13:23 Re: small but useful patches for text search
Previous Message Tom Lane 2009-03-17 00:50:36 Re: Problem with accesing Oracle from plperlu functionwhen using remote pg client.