xref: /netbsd-src/external/public-domain/sqlite/man/sqlite3_db_filename.3 (revision bdc22b2e01993381dcefeff2bc9b56ca75a4235c)
1.Dd March 11, 2017
2.Dt SQLITE3_DB_FILENAME 3
3.Os
4.Sh NAME
5.Nm sqlite3_db_filename
6.Nd Return The Filename For A Database Connection
7.Sh SYNOPSIS
8.Ft const char *
9.Fo sqlite3_db_filename
10.Fa "sqlite3 *db"
11.Fa "const char *zDbName"
12.Fc
13.Sh DESCRIPTION
14The sqlite3_db_filename(D,N) interface returns a pointer to a filename
15associated with database N of connection D.
16The main database file has the name "main".
17If there is no attached database N on the database connection D, or
18if database N is a temporary or in-memory database, then a NULL pointer
19is returned.
20.Pp
21The filename returned by this function is the output of the xFullPathname
22method of the VFS.
23In other words, the filename will be an absolute pathname, even if
24the filename used to open the database originally was a URI or relative
25pathname.
26