Re: [sqlite] Is there a better way to get this information other than modifying SQLite?

2011-10-20 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 20/10/11 14:39, Peter Aronson wrote: > I'm porting code from DBMS platforms that have grants and revokes. One > of the functions gets a list of available tables and what SQL > operations you can perform on them (select, insert, update, delete). A

Re: [sqlite] Doc bug in on-line description of round() function

2011-10-20 Thread Jay A. Kreibich
On Thu, Oct 20, 2011 at 04:03:28PM -0700, Peter Aronson scratched on the wall: > The "Using SQLite" book, I notice gets it right, however. Score! -j -- Jay A. Kreibich < J A Y @ K R E I B I.C H > "Intelligence is like underwear: it is important that you have it, but showing it to the

[sqlite] Doc bug in on-line description of round() function

2011-10-20 Thread Peter Aronson
Here's where I let my pedantic side out to play.  The documentation for the round() function on the SQLite website at http://www.sqlite.org/lang_corefunc.html says: "The round(X,Y) function returns a string representation of the floating-point value X rounded to Y digits to the right of the dec

Re: [sqlite] does a unique constraint imply an index

2011-10-20 Thread BareFeetWare
Hi Sean, In reply to: > In postgres, I know that if I declare a column or set of columns to have a > unique constraint, there is also an index created on those columns. Does the > same thing happen in sqlite Yes. For example: create table Test (Name text collate nocase unique not null); giv

Re: [sqlite] Is there a better way to get this information other than modifying SQLite?

2011-10-20 Thread Simon Slavin
On 20 Oct 2011, at 9:15pm, Peter Aronson wrote: > What I have done at the moment is added a fourth column named "readonly" to > pragma database_list (it gets the value for this column from a function I > added > called sqlite3BtreeIsreadonly(), which in turn > is a wrapper around sqlite3PagerI

Re: [sqlite] Is there a better way to get this information other than modifying SQLite?

2011-10-20 Thread Peter Aronson
Roger, > Out of curiousity why do you want to know this?  Note that even if a > database is opened at the SQLite level readonly it can still be written to > at the operating system level - an example would be recovering from the > journal. I'm porting code from DBMS platforms that have grants and

Re: [sqlite] sql statement to update the data in the table

2011-10-20 Thread Joanne Pham
SELECT AES_ENCRYPT(password, 'abcddsfddafdasfddasd'); is work! I think I need to find out what is the data type and data lengh for storing the encrypt password Thanks, JP From: Simon Slavin To: Joanne Pham ; General Discussion of SQLite Database Sent: Wed

Re: [sqlite] Is there a better way to get this information other than modifying SQLite?

2011-10-20 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 20/10/11 13:15, Peter Aronson wrote: > The first is whether a database currently attached to the database > connection was open read-only or read/write. Out of curiousity why do you want to know this? Note that even if a database is opened at the

Re: [sqlite] Is there a better way to get this information other than modifying SQLite?

2011-10-20 Thread Petite Abeille
On Oct 20, 2011, at 10:15 PM, Peter Aronson wrote: > And while I suppose I could > ask for these changes to be made as enhancements to > SQLite, I assume from the lack of them at this time that they are not exactly > common requirements. Well, prising out any type of metadata from SQLite is a

[sqlite] Is there a better way to get this information other than modifying SQLite?

2011-10-20 Thread Peter Aronson
In the course of porting some software to use SQLite, I found I have needed some information that I could not figure out how to get from SQLite without undo effort, but that SQLite actually "knows".  The first is whether a database currently attached to the database connection was open read-onl

Re: [sqlite] does a unique constraint imply an index

2011-10-20 Thread Sean Pieper
Many thanks. I think my confusion was from the overloading of "automatic index" to mean both "implicit, static" and "generated at runtime" -sean -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Jay A. Kreibich Sent: Thursda

Re: [sqlite] does a unique constraint imply an index

2011-10-20 Thread Jay A. Kreibich
On Thu, Oct 20, 2011 at 09:02:55AM -0700, Sean Pieper scratched on the wall: > I apologize for the newbie question, but the answer isn't obvious from > looking through the site. > > In postgres, I know that if I declare a column or set of columns to > have a unique constraint, there is also an inde

[sqlite] does a unique constraint imply an index

2011-10-20 Thread Sean Pieper
I apologize for the newbie question, but the answer isn't obvious from looking through the site. In postgres, I know that if I declare a column or set of columns to have a unique constraint, there is also an index created on those columns. Does the same thing happen in sqlite, or does the optim

Re: [sqlite] Testing SQLite in C++

2011-10-20 Thread Arbol One
Excellent! Thanks dude! -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Pavel Ivanov Sent: Thursday, October 20, 2011 11:06 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] Testing SQLite in C++ Do not inclu

Re: [sqlite] Testing SQLite in C++

2011-10-20 Thread Pavel Ivanov
Do not include sqlite3ext.h. Applications need only sqlite3.h. Pavel On Thu, Oct 20, 2011 at 11:02 AM, Arbol One wrote: > Hey kids, I am testing SQLite in the hope that I can use it in my program, > but I get this confusing error msg, Can anybody help? > > > > Error message > > > >

[sqlite] Testing SQLite in C++

2011-10-20 Thread Arbol One
Hey kids, I am testing SQLite in the hope that I can use it in my program, but I get this confusing error msg, Can anybody help? Error message D:\dev\sqlitetest\main.cpp:14:10: error: 'sqlite3_api' was not declared in this scope Code ~ #include #include "sqlite/sqlite

Re: [sqlite] string conatenated sql statements

2011-10-20 Thread Igor Tandetnik
Gert Corthout wrote: > I can see only 1 very long-shot security issue. Assuming I am a malafide > programmer at our company I could add ESCAPE ']' to a > vital query that takes user input and then use ]' to break out and inject > some SQL in the live system, right? A malicious developer with a

Re: [sqlite] string conatenated sql statements

2011-10-20 Thread Simon Slavin
On 20 Oct 2011, at 1:55pm, Gert Corthout wrote: > I can see only 1 very long-shot security issue. Assuming I am a malafide > programmer at our company I could add ESCAPE ']' to a vital query that takes > user input and then use ]' to break out and inject some SQL in the live > system, right?

Re: [sqlite] string conatenated sql statements

2011-10-20 Thread Gert Corthout
whoops, forget that, it's not possible as the sql injection would undo the ESCAPE clause > From: gert_corth...@hotmail.com > To: sqlite-users@sqlite.org > Date: Thu, 20 Oct 2011 14:55:00 +0200 > Subject: Re: [sqlite] string conatenated sql statements > > > > > > > To: sqlite-users@sqlite.

Re: [sqlite] string conatenated sql statements

2011-10-20 Thread Gert Corthout
> To: sqlite-users@sqlite.org > From: itandet...@mvps.org > Date: Thu, 20 Oct 2011 07:55:26 -0400 > Subject: Re: [sqlite] string conatenated sql statements > > Gert Corthout wrote: > > My argument so far is that parametrized queries are way faster if used > > properly. > > The next obvious

Re: [sqlite] string conatenated sql statements

2011-10-20 Thread Black, Michael (IS)
See if this satisifies your needs...a complete example showing parameterized statements fixing the problem... http://codesnippets.joyent.com/posts/show/2384 Michael D. Black Senior Scientist Advanced Analytics Directorate Advanced GEOINT Solutions Operating Unit Northrop Grumman Inform

[sqlite] Problems with nested Joins

2011-10-20 Thread Fabrizio Steiner
Hello I'm currently evaluating SQLite for replacing a Microsoft Access (Jet) Database in one of our projects. We use a data layer abstraction which allows us to quickly implement other database. Therefore we allow the user of the data acces layer to make arbitrary nested joins. Currently I hav

Re: [sqlite] string conatenated sql statements

2011-10-20 Thread Richard Hipp
On Thu, Oct 20, 2011 at 7:55 AM, Igor Tandetnik wrote: > Gert Corthout wrote: > > My argument so far is that parametrized queries are way faster if used > properly. > > The next obvious argument is sql injection. On all string input a simple > conversion is done: any ' is replaced by '', that's

Re: [sqlite] string conatenated sql statements

2011-10-20 Thread Igor Tandetnik
Gert Corthout wrote: > My argument so far is that parametrized queries are way faster if used > properly. > The next obvious argument is sql injection. On all string input a simple > conversion is done: any ' is replaced by '', that's it. > This seems to block off any sql injection right there a

Re: [sqlite] IN condition on virtual tables misbehavior

2011-10-20 Thread Jay A. Kreibich
On Thu, Oct 20, 2011 at 12:09:25PM +0200, Sam scratched on the wall: > Hi, >I'm developing a simple virtual table module and I've found possible > misbehavior of virtual table modules when used with IN condition. >select x from y where x in (3) > >calls xFilter without any arg

[sqlite] ANN: SQLite Data Sync released

2011-10-20 Thread SQL Maestro Group
Hi! SQL Maestro Group starts a new product family and announces the release of SQLite Data Sync, a powerful and easy-to-use tool for SQLite database contents comparison and synchronization. http://www.sqlmaestro.com/products/sqlite/datasync/ Key product features: 1. Comparin

[sqlite] IN condition on virtual tables misbehavior

2011-10-20 Thread Sam
Hi, I'm developing a simple virtual table module and I've found possible misbehavior of virtual table modules when used with IN condition. Example: select x from y where x = 3; calls (correctly) function xFilter of my vtab module with parameter 3, but select x from

[sqlite] string conatenated sql statements

2011-10-20 Thread Gert Corthout
hello, I am looking at the data layer of my company's software and noticed we build our queries with string concatenation (including user input). As a former Oracle and SqlServer developer this sends shivers down my spine. I am trying to convince management to get a budget for a switch to par

Re: [sqlite] SQLite

2011-10-20 Thread Christoph P.U. Kukulies
Hey kid, give your post a meaningful subject and you'll probably get an answer quicker This is the Sqlite list. Naming the subject "Sqlite" doesn't speak of much maturity. -- Christoph Am 07.10.2011 17:10, schrieb Arbol One: Hey kids. Looking at the choices given at http://www.sqlite.org/do