nothing like resurrecting a really old thread ... > Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes: >> I have a problem - every call of mvarcharin is with typmod = -1.
2009/3/17 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>: > 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, Is it possible to name any case that *does not* fall into that category? 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. > but you definitely should have a "length conversion cast" > function in pg_cast if you expect to do anything useful with typmod. Ok, that's good to know (and I didn't until now). But back to the input and recv functions, which are both documented to have 3-arg forms that get typmods ... how would one test them? Is there any sql syntax that can be written to make them get passed a typmod? If I just write them with assert(typmod == -1), will anyone ever see a failure? -Chap -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers