Re: Where is the char and varchar length in pg_catalog for function input variables - Mailing list pgsql-general

From Pavan Deolasee
Subject Re: Where is the char and varchar length in pg_catalog for function input variables
Date
Msg-id CABOikdNB9KttWkHx-RpuyeT-s6J3D5MDA-wMtbMaTLC7BpsoSQ@mail.gmail.com
Whole thread Raw
In response to Where is the char and varchar length in pg_catalog for function input variables  (jam3 <jamorton3@gmail.com>)
Responses Re: Where is the char and varchar length in pg_catalog for function input variables
Re: Where is the char and varchar length in pg_catalog for function input variables
List pgsql-general


On Wed, Sep 5, 2012 at 9:10 PM, jam3 <jamorton3@gmail.com> wrote:
I have searched and searched and just cannot find the maximum lengths for
input variables in a function

i.e.

CREATE FUNCTION test(input1 char(5), input2 varchar(50))
RETURNS void AS
$$RAISE NOTICE('%,%'), $1, $2;$$
LANGUAGE plpgsql;


Where do I find the 5 and the 50 it has to be somewhere I have searched
through
pg_proc
pg_type
pg_attribute (whose attlen only relates to tables)
pg_type

and all possible manner of joining these tables.


Hmm. I only looked at the code and hence don't have a definite answer. But it seems that information is not stored anywhere. That might explain why the function you mentioned accepts parameters with any character length.

Thanks,
Pavan


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Where is the char and varchar length in pg_catalog for function input variables
Next
From: Pavel Stehule
Date:
Subject: Re: Where is the char and varchar length in pg_catalog for function input variables