> -----Original Message-----
> From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-
> ow...@postgresql.org] On Behalf Of jam3
> Sent: Wednesday, September 05, 2012 3:34 PM
> To: pgsql-general@postgresql.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.






-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to