Re: About the function current_user

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: About the function current_user
Дата
Msg-id CAFj8pRD-_mptStv288kHAPE4UeeJR1cXALioJgG1wNQ_oR-pPQ@mail.gmail.com
обсуждение исходный текст
Ответ на About the function current_user  ("Xiong He" <iihero@qq.com>)
Ответы Re: About the function current_user  (Daniel Gustafsson <daniel@yesql.se>)
Список pgsql-bugs
Hi


po 20. 3. 2023 v 8:01 odesílatel Xiong He <iihero@qq.com> napsal:
Dear All,

Just confused,  why :
postgres=# select current_user;
 current_user
--------------
 postgres
(1 row)

postgres=# select current_user();
2023-03-20 07:00:02.981 UTC [17281] ERROR:  syntax error at or near "(" at character 20
2023-03-20 07:00:02.981 UTC [17281] STATEMENT:  select current_user();
ERROR:  syntax error at or near "("
LINE 1: select current_user();
                           ^

why current_user() is not recognized?  

this is not real function - it is pseudo constant

The real function in postgres has a record in the pg_proc table.

Regards

Pavel

 
But the similar function current_database and current_database(), both can work.

Regards,
Xiong He [iihero] 


 

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

Предыдущее
От: "Xiong He"
Дата:
Сообщение: About the function current_user
Следующее
От: Daniel Gustafsson
Дата:
Сообщение: Re: About the function current_user