Is current_user a function ?

Поиск
Список
Период
Сортировка
От Masaru Sugawara
Тема Is current_user a function ?
Дата
Msg-id 20021129010833.1CFB.RK73@sea.plala.or.jp
обсуждение исходный текст
Ответы Re: Is current_user a function ?  (Rod Taylor <rbt@rbt.ca>)
Re: Is current_user a function ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi,

As for some current_*** functions, "select current_user;" seems to
work, but  "select current_user();" doesn't . Though current_user is
defined as one of functions, why does such an error occur ?

renew=# select current_user();
ERROR:   parser: parse error at or near "(" at character 20


Regards,
Masaru Sugawara


renew=# \df                                                             List of functions  Result data type  |   Schema
 |         Name          | Argument data types                                                 
 
---------------------+------------+-----------------------+-----------...name                | pg_catalog |
current_database     | name                | pg_catalog | current_schema        | name[]              | pg_catalog |
current_schemas      | booleantext                | pg_catalog | current_setting       | textname                |
pg_catalog| current_user          | ...
 


renew=# select current_user();
ERROR:   parser: parse error at or near "(" at character 20

renew=# select current_database();current_database 
------------------renew
(1 row)

renew=# select current_schema();current_schema 
----------------public
(1 row)

renew=# select current_schema(true);  current_schemas   
---------------------{pg_catalog,postgres,public}
(1 row)

renew=# select current_schema(false);  current_schemas   
---------------------{postgres,public}
(1 row)

renew=# select current_setting('search_path');current_setting 
-----------------$user,public
(1 row)








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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: nested transactions
Следующее
От: Rod Taylor
Дата:
Сообщение: Re: Is current_user a function ?