| От | Tom Lane |
|---|---|
| Тема | Re: converting an oracle procedure to postgres |
| Дата | |
| Msg-id | 16320.1066689135@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | converting an oracle procedure to postgres ("Clint Stotesbery" <cstotes@hotmail.com>) |
| Список | pgsql-sql |
"Clint Stotesbery" <cstotes@hotmail.com> writes:
> I know I have to relpace the word PROCEDURE with FUNCTION but then it wants
> me to put RETURNS <datatype> but I don't want to return anything.
You can say RETURNS VOID in recent releases. This is a bit of a hack
but it expresses your intent ... you still have to use SELECT to invoke
the function though.
regression=# create or replace function fooey () returns void as '
regression'# begin
regression'# raise notice ''fooey'';
regression'# return;
regression'# end' language plpgsql;
CREATE FUNCTION
regression=# select fooey();
NOTICE: fooeyfooey
-------
(1 row)
regression=#
regards, tom lane
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера