Diego Linke - GAMK <linke@calnet.com.br> writes:
> The problem is that postgresql when calls a function in external C,
> calls with user of the postgres.
The ability to create C functions is reserved to superusers, for exactly
this reason. If you have the rights to make the backend execute
arbitrary C code, you hardly need a shell to do something nasty.
In short, this is not a bug. Don't give superuser privileges to people
you cannot trust.
regards, tom lane