NetBSD-Bugs archive

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

lib/46322: SQLite from base does not include useful functions

>Number:         46322
>Category:       lib
>Synopsis:       SQLite from base is compiled without 
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Apr 11 00:15:00 +0000 2012
>Originator:     Pierre Pronchery <>
>Release:        NetBSD 6.0_BETA
System: NetBSD syn.defora.rom 6.0_BETA NetBSD 6.0_BETA (GENERIC) #7: Tue Apr 10 
02:09:40 CEST 2012 
Architecture: x86_64
Machine: amd64
A number of functions from SQLite 3 are only available when the
libsqlite3 library is built with particular values defined. One such
setting is SQLITE_ENABLE_COLUMN_METADATA, which includes the following
functions when enabled:

- sqlite3_column_database_name()
- sqlite3_column_database_name16()
- sqlite3_column_table_name()
- sqlite3_column_table_name16()
- sqlite3_column_origin_name()
- sqlite3_column_origin_name16()
- sqlite3_table_column_metadata()

These functions may be essential for completeness (including matching
the documentation), as well as for programmers relying on SQLite 3 as
available from base to be fully functional. At least to me :)

FWIW, I am currently relying on the sqlite3_column_origin_name()
function while analyzing results from prepared statements, passing the
column names along with the resulting rows of data to my respective
callbacks. The other functions are returning the respective databases
and tables associated to each column.

If this change is accepted, a pull-up to the netbsd-6 branch would also
be much appreciated.

Use any of the functions listed above in a C/C++ program linked with
libsqlite3 from base.
As follows:

Index: external/public-domain/sqlite/
RCS file: /cvsroot/src/external/public-domain/sqlite/,v
retrieving revision 1.3
diff -p -u -r1.3
--- external/public-domain/sqlite/  11 Nov 2011 01:34:18 -0000      
+++ external/public-domain/sqlite/  10 Apr 2012 22:16:11 -0000
@@ -10,6 +10,7 @@ CPPFLAGS+=    -DHAVE_READLINE=1 -DHAVE_LOCA
 CWARNFLAGS+=   -Wno-shadow -Wno-unused

 Wed Apr 11 00:14:47 CEST 2012

Home | Main Index | Thread Index | Old Index