Re: org.postgresql.util.PSQLException: ERROR: operator does not exist: character varying = integer
В списке pgsql-jdbc по дате отправления:
| От | Ashish Jain |
|---|---|
| Тема | Re: org.postgresql.util.PSQLException: ERROR: operator does not exist: character varying = integer |
| Дата | |
| Msg-id | 14af40510906171210x3452fdbay4f77345b41751e20@mail.gmail.com обсуждение |
| Ответ на | Re: org.postgresql.util.PSQLException: ERROR: operator does not exist: character varying = integer (Richard Broersma <richard.broersma@gmail.com>) |
| Список | pgsql-jdbc |
create function integer2character(in integer) returns character as 'select
$1::character' language sql immutable returns null on null input;
create cast (integer AS character) with function integer2character (in integer) AS
implicit;
Thanks
Ashish
On Wed, Jun 17, 2009 at 6:35 AM, Ashish Jain<ashjain2@gmail.com> wrote:The SQL standard way would be: CAST( your_int_column AS TEXT )
> Can any one help me to write a cast statement which automatically cast
> integer to character??
or the Postgresql way: your_int_column::TEXT
--
Regards,
Richard Broersma Jr.
Visit the Los Angeles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug
В списке pgsql-jdbc по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера