| От | Emil Rachovsky |
|---|---|
| Тема | problem with overloading the "coalesce" function |
| Дата | |
| Msg-id | 20060306101812.89563.qmail@web54308.mail.yahoo.com обсуждение |
| Ответы |
Re: [GENERAL] problem with overloading the "coalesce" function
|
| Список | pgsql-sql |
Hi, I am trying to overload the "coalesce" function to accept an integer and a string. Here it is : CREATE OR REPLACE FUNCTION "coalesce"(a int4, b "varchar") RETURNS "varchar" AS $BODY$ begin if (a is null ) then return b; else return cast(a as varchar(15)); end if; end $BODY$ LANGUAGE 'plpgsql' VOLATILE; ALTER FUNCTION "coalesce"(a int4, b "varchar") OWNER TO postgres; I have added it to pg_catalog, but still I cant't use it, I get an error on the second parameter, apparently the function gets lost at some point. Any additional steps I need to complete? Thanks in advance, Emil __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера