On 2 May 2013, at 3:52pm, Igor Tandetnik <i...@tandetnik.org> wrote:

> On 5/2/2013 10:45 AM, Simon Slavin wrote:
>> I know of the reluctance among the SQLite programmers to add features to the 
>> intentionally 'lite' product, but I am coming to the conclusion that having 
>> this feature in the standard code base will be of great convenience to a lot 
>> of users.
>> 
>> I would like the introduction of a command which changes a SELECT the same 
>> way EXPLAIN QUERY PLAN changes a SELECT.  This one should take the SELECT 
>> and instead of producing a table, sometimes with many columns, produces a 1 
>> column table with the SELECTed data shown as INSERT commands, with values 
>> correctly single-quoted where necessary.
> 
> Why? What's the point of the exercise? How would you use this beast if you 
> had it?

All good questions.

I have lots of things that need to massage data.  Duplicate a table.  Reproduce 
a table but with a slight difference.  Change the affinity of a column.  Things 
like that.

> In any case, it's not clear why the implementation must live inside the 
> engine. SQLite API provides sufficient information for you to be able to pull 
> this off within the host application, if you are so inclined.

Yes, I currently write code that reads the table, fetches the column names, 
figures out whether each value needs to be quoted, etc. etc..  But I'd need to 
write that code in four different languages. Or to develop my own special 
addition to the amalgamation.  And whichever I had done I would worry that 
internal changes to SQLite were going to happen that would make my code buggy.

Only a bare minimum of my apps that use SQLite are written in C or in anything 
else that can supply a function or extension.  In fact, I think I currently 
have only one.  Almost all my apps are written in one or another high level 
language, e.g. JavaScript.

On 2 May 2013, at 3:49pm, Jay A. Kreibich <j...@kreibi.ch> wrote:

>  You know the sqlite3 program already does this, right?

Right.  But one of my platforms has no way for one program to call another, and 
in another one the only way I can do it is to give my app the ability to call 
/any/ app, and I don't want to risk someone figuring out how to subvert my app 
to do something bad.

I'm aware I'm probably an unusual kind of programmer.  If there was a flood of 
support for the idea it might happen.  Looking at the lack of other posts I 
guess it won't.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to