Re: How can I test a function in the SQL window?

Поиск
Список
Период
Сортировка
От Raymond O'Donnell
Тема Re: How can I test a function in the SQL window?
Дата
Msg-id 551D7864.8060200@iol.ie
обсуждение исходный текст
Ответ на How can I test a function in the SQL window?  (Rob Richardson <RDRichardson@rad-con.com>)
Список pgadmin-support
On 02/04/2015 18:02, Rob Richardson wrote:
> Hello!
> 
>  
> 
> I suddenly find myself stumped.  A co-worker gave me a function to use
> in my database, but it doesn’t seem to be doing anything.  So, I wanted
> to run it from PGAdmin’s SQL window.  But I can’t call it.  When I try
> 
>  
> 
> select standupdatestatus('12', 'Loaded', 100);
> 
>  
> 
> I get:
> 
>  
> 
> ERROR:  query has no destination for result data
> 
> HINT:  If you want to discard the results of a SELECT, use PERFORM instead.
> 
> CONTEXT:  PL/pgSQL function standupdatestatus(text,text,integer) line 44
> at SQL statement
> 
> ********** Error **********
> 
>  
> 
> ERROR: query has no destination for result data
> 
> SQL state: 42601
> 
> Hint: If you want to discard the results of a SELECT, use PERFORM instead.
> 
> Context: PL/pgSQL function standupdatestatus(text,text,integer) line 44
> at SQL statement
> 
>  
> 
> When I try
> 
>  
> 
> perform standupdatestatus('12', 'Loaded', 100);
> 
>  
> 
> I get:
> 
>  
> 
> ERROR:  syntax error at or near "perform"
> 
> LINE 1: perform standupdatestatus('12', 'Loaded', 100);

You probably need to do:
 perform * from standupdatestatus(...);

HTH,

Ray.


-- 
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie



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

Предыдущее
От: Rob Richardson
Дата:
Сообщение: How can I test a function in the SQL window?
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: How can I test a function in the SQL window?