Search Postgresql Archives

Re: Can the username calling a function be made available within the function?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday 07 April 2004 11:23, Adam Witney wrote:
> I'd like to be able to have a PL/pgSQL function defined as SECURITY
> DEFINER, but still have access to the calling username within the function.
> Is this possible?
>
> I could pass current_user as a parameter, but of course this could easily
> be bypassed.
>
> Is there a way of coding this?

Just "SELECT CURRENT_USER" into a variable. You might want SESSION_USER 
though.


-- 
  Richard Huxton
  Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux