Re: [HACKERS] typmod is always -1

2016-03-20 Thread Jim Nasby
On 3/17/16 7:40 PM, Tom Lane wrote: Chapman Flack writes: It seems that a typmod can only be used restrict the set of possible values of the unmodified type (as clearly seen in the language "length conversion cast", since certainly a typmod allowing { string | length < N

Re: [HACKERS] typmod is always -1

2016-03-19 Thread Tom Lane
Chapman Flack writes: > It seems that a typmod can only be used restrict the set of possible > values of the unmodified type (as clearly seen in the language "length > conversion cast", since certainly a typmod allowing { string | length < N } > is doing nothing but

Re: [HACKERS] typmod is always -1

2016-03-19 Thread Tom Lane
Chapman Flack writes: > I'm in the same boat ... I have an input function I want to test, and so > far I have failed to think of *any* sql construct that causes it to be > invoked with other than -1 for the typmod. COPY was the first case a quick grep came across.

Re: [HACKERS] typmod is always -1

2016-03-19 Thread Chapman Flack
On 03/17/16 09:35, Tom Lane wrote: > Chapman Flack writes: >> I'm in the same boat ... I have an input function I want to test, and so >> far I have failed to think of *any* sql construct that causes it to be >> invoked with other than -1 for the typmod. > > COPY was the

Re: [HACKERS] typmod is always -1

2009-03-16 Thread Tom Lane
Pavel Stehule pavel.steh...@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.

Re: [HACKERS] typmod is always -1

2009-03-16 Thread Pavel Stehule
2009/3/17 Tom Lane t...@sss.pgh.pa.us: Pavel Stehule pavel.steh...@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