Re: Re: Where is the char and varchar length in pg_catalog for function input variables

From: "David Johnston" <polobo(at)yahoo(dot)com>
To: "'jam3'" <jamorton3(at)gmail(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Re: Where is the char and varchar length in pg_catalog for function input variables
Date: 2012-09-05 21:05:07
Message-ID: 01c201cd8baa$2151c2c0$63f54840$@yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> -----Original Message-----
> From: pgsql-general-owner(at)postgresql(dot)org [mailto:pgsql-general-
> owner(at)postgresql(dot)org] On Behalf Of jam3
> Sent: Wednesday, September 05, 2012 3:34 PM
> To: pgsql-general(at)postgresql(dot)org
> Subject: [GENERAL] Re: Where is the char and varchar length in pg_catalog
> for function input variables
>
> This is what I meant to post
>
> ..................
>
> Just showing that it does indeed not use the length in at all, and this
just
> seems wrong. I can definetly see situations where someone would put a
> length on a in put var and get an an unexpected result, like the one
above.
>

You can argue it is wrong, and I'd tend to agree. But that is how things
are until someone decides it is painful enough to implement a better way.

It is a documented situation though suggestions for improvements there are
always welcome.

If/when you care you can implement adhoc validation inside the function.

Discoverability via meta-data is the nice but lacking ability with the
current model but for arbitrary length and precision/scale specifications
that ability has limited (but non-zero) value. For better and worse you can
"extend" the system tables and include the meta-data that you feel is
necessary to make the system work. It is a much less invasive procedure
than altering the catalogs themselves.

David J.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2012-09-05 21:10:14 Re: Would my postgresql 8.4.12 profit from doubling RAM?
Previous Message Kevin Grittner 2012-09-05 21:02:13 Re: Where is the char and varchar length in pg_catalog for function input variables