About the function current_user - Mailing list pgsql-bugs

From Xiong He
Subject About the function current_user
Date
Msg-id tencent_AECDFA4FA154BDEBDA5541EA988C8C56BF06@qq.com
Whole thread Raw
Responses Re: About the function current_user
List pgsql-bugs
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?  
But the similar function current_database and current_database(), both can work.

Regards,
Xiong He [iihero] 


 

pgsql-bugs by date:

Previous
From: Alexander Lakhin
Date:
Subject: Re: BUG #17847: Unaligned memory access in ltree_gist
Next
From: Pavel Stehule
Date:
Subject: Re: About the function current_user