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

Поиск
Список
Период
Сортировка
От David Johnston
Тема Re: Re: Where is the char and varchar length in pg_catalog for function input variables
Дата
Msg-id 01c201cd8baa$2151c2c0$63f54840$@yahoo.com
обсуждение исходный текст
Ответ на Re: Where is the char and varchar length in pg_catalog for function input variables  (jam3 <jamorton3@gmail.com>)
Список pgsql-general
> -----Original Message-----
> From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-
> owner@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.






В списке pgsql-general по дате отправления:

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: Where is the char and varchar length in pg_catalog for function input variables
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: Would my postgresql 8.4.12 profit from doubling RAM?