imlicit varchar truncation

Поиск
Список
Период
Сортировка
От Pavel B. Milovantsev
Тема imlicit varchar truncation
Дата
Msg-id 1300716597.3957.17.camel@pavhome.intis.tomsk.ru
обсуждение исходный текст
Ответы Re: imlicit varchar truncation  (Sean Bowman <pico303@gmail.com>)
Список pgsql-jdbc
Hello.

    I meet the difficulties with insert/update commands using Postgresql
JDBC driver.

    Due to problems described previously at

> Re: value too long for type character varying(25) (http://archives.postgresql.org/pgsql-novice/2002-11/msg00166.php)

 and

>Re: ParameterMetaData getPrecision() always zero? (http://archives.postgresql.org/pgsql-jdbc/2010-01/msg00077.php)

I have to perform an additional call to connection.getMetaData().getColumns()
in order to obtain the size of inserted/updated varchar field, and either
truncate the value at the client side, or make explicit truncations as shown
at (http://www.postgresql.org/docs/9.0/static/datatype-character.html)

The question is, are there any "standard" ways to avoid this excessive
call?
    Have to say that a hand-made DB scheme caching is not the option.

Thank you in advance.
    Pavel Milovantsev.

Вложения

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

Предыдущее
От: Vitalii Tymchyshyn
Дата:
Сообщение: Re: domains handling problem
Следующее
От: Sean Bowman
Дата:
Сообщение: Re: imlicit varchar truncation