Database 如何在postgresql日志中获取已连接客户端的mac地址?

Database 如何在postgresql日志中获取已连接客户端的mac地址?,database,postgresql,client,connect,mac-address,Database,Postgresql,Client,Connect,Mac Address,每当用户连接到PostgreSQL数据库时,我都希望在PostgreSQL的日志文件中显示该连接用户的MAC地址。怎么做? 你不能 当然,您可以从arp缓存或其他系统实用程序获取它,但不能使用postgreslog\u line\u prefix %a Application name yes %u User name yes %d Database name yes %r Remote host name or IP address, and remote

每当用户连接到PostgreSQL数据库时,我都希望在PostgreSQL的日志文件中显示该连接用户的MAC地址。怎么做?

你不能

当然,您可以从arp缓存或其他系统实用程序获取它,但不能使用postgres
log\u line\u prefix

%a    Application name    yes
%u    User name   yes
%d    Database name   yes
%r    Remote host name or IP address, and remote port yes
%h    Remote host name or IP address  yes
%p    Process ID  no
%t    Time stamp without milliseconds no
%m    Time stamp with milliseconds    no
%n    Time stamp with milliseconds (as a Unix epoch)  no
%i    Command tag: type of session's current command  yes
%e    SQLSTATE error code no
%c    Session ID: see below   no
%l    Number of the log line for each session or process, starting at 1   no
%s    Process start time stamp    no
%v    Virtual transaction ID (backendID/localXID) no
%x    Transaction ID (0 if none is assigned)  no
%q    Produces no output, but tells non-session processes to stop at this point in the string; ignored by session processes   no
%%    Literal %