refer function name by a variable in the function body

Поиск
Список
Период
Сортировка
От Suresh Raja
Тема refer function name by a variable in the function body
Дата
Msg-id CAJP7dtDr++ZXgPEXoayNQfjjHBwBc7607iuj84PS2Pk8HZqfyQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: refer function name by a variable in the function body  (amulsul <sul_amul@yahoo.co.in>)
Список pgsql-sql
Hi All:

I use the function name in the body of pgsql code of the same function.  Is the function name set to any variable that i can easily reference.  Now I'm hard coding the function name in the code.

create or replace function compute_X(a1 text) returns text as 
.....
...
Begin
.....
....
select user into user_id;
raise info 'starting function compute_X as %' user_id || timeofday();

end;

In the above Raise info i use select user to get the login role, similarly can i use a variable for function name which is automatically set by the system.  

Thanks,
-SR


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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: [ODBC] PostgreSQL: Inserting NULL values adds empty string.
Следующее
От: amulsul
Дата:
Сообщение: Re: refer function name by a variable in the function body