Stephane Bortzmeyer <bortzmeyer@xxxxxx> writes: > The real issue is "Why PostgreSQL does not use getpwuid when > getsockopt with SO_PEERCREED returns a numeric UID?" Oh? I read in hba.c if (getsockopt(sock, SOL_SOCKET, SO_PEERCRED, &peercred, &so_len) != 0 || so_len != sizeof(peercred)) { /* We didn't get a valid credentials struct. */ ereport(LOG, (errcode_for_socket_access(), errmsg("could not get peer credentials: %m"))); return false; } pass = getpwuid(peercred.uid); so it sure looks like we *are* using getpwuid. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match