Hi Jeffrey,
use something like this:
struct passwd *who;
if ((who = getpwuid(getuid ())) != NULL)
{
oUserName = who->pw_name;
}
where oUserName is the desired result.
See http://www.sqlite.org/capi3ref.html#sqlite3_create_function how to
define your function.
Martin
Hoover, Jeffrey schrieb:
> Can anyone tell me set-by-step how to add a CURRENT_USER() function to
> SQLLITE that will return the current linux login?
>
>
>
> I'm not a C programmer and I have JUST picked up SQLite.
>
> I am trying to convert a Sybase schema to SQLite. The schema has
> triggers triggers but so far they convert in a pretty straightforward
> manner...that is, util I ran into a reference to "current_user" in
> Sybase...
>
>
>
> Please help.
>
>
>
> Jeff.
>
>
>
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
>
--
* Codeswift GmbH *
Traunstr. 30
A-5026 Salzburg-Aigen
Tel: +49 (0) 8662 / 494330
Mob: +49 (0) 171 / 4487687
Fax: +49 (0) 12120 / 204645
[email protected]
www.codeswift.com / www.swiftcash.at
Codeswift Professional IT Services GmbH
Firmenbuch-Nr. FN 202820s
UID-Nr. ATU 50576309
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users