On Wed, Nov 30, 2005 at 04:25:41PM +0100, Steffen Goeldner wrote:
> Tim Bunce wrote:
> 
> >
> [...]
> >
> > Why not help save the world and help me add current_schema() to the DBI
> > and send implementations to the authors of drivers you're using?
> 
> I'd like to remark that SQL/CLI has a more general function
> 
>   GetSessionInfo( ConnectionHandle, InfoType, ... )
> 
>   <general value specification>   Data Type    Code  Information Type
>   ------------------------------- ------------ ----- 
> -------------------------------
>   USER and CURRENT_USER           CHARACTER(L)    47 CURRENT USER
>   CURRENT_DEFAULT_TRANSFORM_GROUP CHARACTER(L) 20004 CURRENT DEFAULT 
> TRANSFORM GROUP
>   CURRENT_PATH                    CHARACTER(L) 20005 CURRENT PATH
>   CURRENT_ROLE                    CHARACTER(L) 20006 CURRENT ROLE
>   SESSION_USER                    CHARACTER(L) 20007 SESSION USER
>   SYSTEM_USER                     CHARACTER(L) 20008 SYSTEM USER
> 
> (similar to GetInfo()). Translated to DBI , this would be
> 
>   $value = $dbh->get_session_info( $info_type );

Great. It should be straightforward implement by copying how get_info() works.

Any volunteers?

Tim.

Reply via email to