| От | Michael Fuhr |
|---|---|
| Тема | Re: Error Returned by A Function |
| Дата | |
| Msg-id | 20060110164009.GA62009@winnie.fuhr.org обсуждение исходный текст |
| Ответ на | Error Returned by A Function ("Lane Van Ingen" <lvaningen@esncc.com>) |
| Список | pgsql-novice |
On Tue, Jan 10, 2006 at 10:42:39AM -0500, Lane Van Ingen wrote:
> select * from current_neighbors(2);
>
> ERROR: cannot assign non-composite value to a row variable
> CONTEXT: PL/pgSQL function "current_neighbors" line 15 at assignment
Line 15 of the function is:
> returnValue := 'none';
You've declared returnValue to be a composite type (typ_remote_net)
so you need to assign to a particular column or use a row constructor:
returnValue.remote_net := 'none';
-- or
returnValue := row('none');
Likewise in a few other places. Also, the function's query has a
syntax error:
> order by BY 1,3,2
--
Michael Fuhr
В списке pgsql-novice по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера