Hi,

I've been using libdbi in syslog-ng to insert log data into SQL
databases. I've an issue with the sqlite driver though:

when the result is an empty set, it does not return the column headers -
unlike other drivers -, and this causes problems with syslog-ng.

To describe the problem I have to give some detail how syslog-ng uses
SQL, but please bear with me:

syslog-ng creates tables for itself automatically, so if a table does
not exist, or does not have the required columns, it creates it or adds
the needed columns.

For this it needs to detect whether a table exists, using this simple
query:

SELECT * FROM table WHERE 0=1

MySQL, PgSQL, MSSQL and Oracle returns an empty result set, with the
column information in it. SQLite on the other hand returns no rows and
no columns either.

I don't really know sqlite internals and neither do I know libdbi driver
internals, but I was wondering whether this behaviour can be worked
around in libdbi, or it is something that I have to live with, and the
query above is not a generic, database independent way of finding out
table structure?

Thanks in advance,

-- 
Bazsi



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Libdbi-drivers-devel mailing list
Libdbi-drivers-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel

Reply via email to