Re: [sqlite] Regarding CoC

2018-10-22 Thread Philip Warner
I'm guessing this is an appropriately satirical response to a ridiculous request 
from corporates. If not, then:


- ditch all the religious mumbo-jumbo: 1, 10, 21, 41, 42, 44, 45, 46, 49, 50, 
58, 60, 61, 62, 63, 70, 72


- and probably the masochism: 11

- and probably "Do not swear, for fear of perjuring yourself"...which read like 
"don't commit to anything".


in short...go for something simpler. "Don't be evil" worked pretty well for me, 
not sure why Google dropped it, except of course they presumably planned to be 
evil, or they had difficulty telling the difference any more.





___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Regarding CoC

2018-10-22 Thread Paul
If my opinion has any value, even though being atheist, I prefer this CoC 100 
times over
the CoC that is being currently pushed onto the many open-source communities, 
that was
created by some purple-headed feminist with political motives. This one does 
not have 
any hidden intentions (at least, it seems so to me, knowing that you're honest 
person).


23 October 2018, 03:47:29, by "Jim Dossey" :

> I think Donald Knuth would approve.
> 
> On Mon, Oct 22, 2018 at 8:01 PM D Burgess  wrote:
> 
> > > The CoC is fine. Don't change it.
> > +1
> > ___
> > sqlite-users mailing list
> > sqlite-users@mailinglists.sqlite.org
> > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> >
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> 
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Regarding CoC

2018-10-22 Thread Jim Dossey
I think Donald Knuth would approve.

On Mon, Oct 22, 2018 at 8:01 PM D Burgess  wrote:

> > The CoC is fine. Don't change it.
> +1
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Regarding CoC

2018-10-22 Thread D Burgess
> The CoC is fine. Don't change it.
+1
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Help!

2018-10-22 Thread Simon Slavin
On 22 Oct 2018, at 10:43pm, Petite Abeille  wrote:

> You could try the following perhaps:
> 
> Import a CSV File Into an SQLite Table
> http://www.sqlitetutorial.net/sqlite-import-csv/

That is a good page.  Documentation for the CLI tool it refers to can be found 
in chapter 8 of



You may find this easier to read.

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


Re: [sqlite] Regarding CoC

2018-10-22 Thread Petite Abeille


> On Oct 22, 2018, at 11:31 PM, Simon Slavin  wrote:
> 
> And now has reached the summit of Slashdot's front page:

Slow news day. Good night, and good luck.

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Help!

2018-10-22 Thread Petite Abeille


> On Oct 22, 2018, at 11:35 PM, am...@juno.com wrote:
> 
> October 22, 2018 Hello Good People: I need to import a large bunch of names 
> (first and last), and id numbers into SQ Lite. How do I do en-mas--as opposed 
> to copying and pasting each individual name, clock number, etc? I would be 
> most appreciative if you would give me very explicit directions. Thanks very 
> much in advance. Respectfully yours, Alex Stavis

You could try the following perhaps:

Import a CSV File Into an SQLite Table
http://www.sqlitetutorial.net/sqlite-import-csv/



___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Regarding CoC

2018-10-22 Thread Petite Abeille


> On Oct 22, 2018, at 10:32 PM, Donald Shepherd  
> wrote:
> 
> It's disappointing

Why so serious? Plus, really, what have the romans ever done for us?
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Help!

2018-10-22 Thread am...@juno.com
October 22, 2018 Hello Good People: I need to import a large bunch of names 
(first and last), and id numbers into SQ Lite. How do I do en-mas--as opposed 
to copying and pasting each individual name, clock number, etc? I would be most 
appreciative if you would give me very explicit directions. Thanks very much in 
advance. Respectfully yours, Alex Stavis

How To Remove Eye Bags & Lip Lines Fast (Watch)
Fit Mom Daily
http://thirdpartyoffers.juno.com/TGL3131/5bce42dea708f42de5ea5st03vuc
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Regarding CoC

2018-10-22 Thread Simon Slavin
On 22 Oct 2018, at 10:05pm, Richard Hipp  wrote:

> It even made TheRegister:
> https://www.theregister.co.uk/2018/10/22/sqlite_code_of_conduct/

And now has reached the summit of Slashdot's front page:



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


Re: [sqlite] Regarding CoC

2018-10-22 Thread Richard Hipp
On 10/19/18, Simon Slavin  wrote:
>
> Yeah, that's gonna magically appear on Hacker News within the month.  For
> those curious ...

It even made TheRegister:
https://www.theregister.co.uk/2018/10/22/sqlite_code_of_conduct/

-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Regarding CoC

2018-10-22 Thread Ned Fleming

On 2018-10-22 10:29 AM, Richard Hipp wrote:



In summary: The values expressed by the current CoC have been
unchanged for decades and will not be changing as we move forward.  If
some people are uncomfortable with those values, then I am very sorry
for them, but that does not change the fact.  On the other hand, I am
open to suggestions on how to express those values in a way that
modern twitter-ites can better understand, so do not hesitate to speak
up if you have a plan.



The CoC is fine. Don't change it.

We live in a world of offended mobs. The mobs use twitter. Twitter is 
the cloaca of the Internet -- an open, running sewer. The sewer runs to 
a cesspool and, as in any cesspool, the largest chunks rise to the top. 
You can't reason with these chatterboxes, so don't try. Soon, this minor 
pool will dry up and the mob will move on to a new outrage. Outrage for 
outrage's sake. There's always a new enemy to smash in a show of force.


--
Ned
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Regarding CoC

2018-10-22 Thread Donald Shepherd
It's disappointing that some are using discussion on a (perfectly
acceptable) CoC to turn it into an excuse to post "jokes" about other
people's beliefs, but whatever floats your boat.

Regards,
Donald Shepherd.

On Tue, 23 Oct 2018 at 07:05, Charles Leifer  wrote:

> I dig the new CoC (not that anyone's counting).
>
> I'll share my comment from HN:
>
> If the code of conduct angers you, stop and think -- how did you feel one
> minute before you read the CoC? Is the problem really the CoC, or is it
> your collection of beliefs that is causing the problem? Furthermore, are
> you even affected? Do you contribute bug reports or patches? Follow the
> SQLite mailing list? Is anything here designed to prevent you from
> continuing to do so?
>
> SQLite's author is a spiritual guy. There's nothing wrong with him
> borrowing from spiritual sources to describe his ideal for how he wants the
> SQLite community to conduct itself.
>
> ...
>
> Also, how can you tell if someone's an atheist?
>
> Haha, don't worry friend, they'll be sure to tell you.
>
> Keep up the amazing work, SQLite team. The good tree bears the good fruit,
> and man SQLite is some good fruit.
>
> On Mon, Oct 22, 2018 at 2:49 PM Petite Abeille 
> wrote:
>
> >
> >
> > > On Oct 22, 2018, at 9:43 PM, Rob Dixon  wrote:
> > >
> > > weird and antagonistic
> >
> > Thank you for the kind words of support. Your wisdom and insights will be
> > missed. Farewell Rob Dixon. Godspeed.
> >
> > ___
> > sqlite-users mailing list
> > sqlite-users@mailinglists.sqlite.org
> > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> >
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Regarding CoC

2018-10-22 Thread Charles Leifer
I dig the new CoC (not that anyone's counting).

I'll share my comment from HN:

If the code of conduct angers you, stop and think -- how did you feel one
minute before you read the CoC? Is the problem really the CoC, or is it
your collection of beliefs that is causing the problem? Furthermore, are
you even affected? Do you contribute bug reports or patches? Follow the
SQLite mailing list? Is anything here designed to prevent you from
continuing to do so?

SQLite's author is a spiritual guy. There's nothing wrong with him
borrowing from spiritual sources to describe his ideal for how he wants the
SQLite community to conduct itself.

...

Also, how can you tell if someone's an atheist?

Haha, don't worry friend, they'll be sure to tell you.

Keep up the amazing work, SQLite team. The good tree bears the good fruit,
and man SQLite is some good fruit.

On Mon, Oct 22, 2018 at 2:49 PM Petite Abeille 
wrote:

>
>
> > On Oct 22, 2018, at 9:43 PM, Rob Dixon  wrote:
> >
> > weird and antagonistic
>
> Thank you for the kind words of support. Your wisdom and insights will be
> missed. Farewell Rob Dixon. Godspeed.
>
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Regarding CoC

2018-10-22 Thread Petite Abeille


> On Oct 22, 2018, at 9:43 PM, Rob Dixon  wrote:
> 
> weird and antagonistic

Thank you for the kind words of support. Your wisdom and insights will be 
missed. Farewell Rob Dixon. Godspeed.

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Regarding CoC

2018-10-22 Thread Rob Dixon
Thank you Simon, I will. SQL compact will do just fine for me. Funny, I
used to advocate for using SQLite. Now that I know more about the people
involved with it, I want nothing do to with it. Best of luck being weird
and antagonistic.

On Mon, Oct 22, 2018 at 1:22 PM R Smith  wrote:

>
> On 2018/10/22 7:09 PM, Simon Slavin wrote:
> >
> > If you're not going to accept those rules, in exactly the translation
> used, you might as well pick something entirely different.
> >
> > Simon.
>
> Indeed. Further to this, as I understand a CoC, it's basically the core
> entity informing whomever be so interested, how he/she/they aim to
> conduct themselves in the fulfillment of duties or business.
>
> I do not think it proscribes or prescribes to anyone else.
>
> For me, speaking as the avid Atheist I am, the specific rule-set in
> question is weird, but it also provides a great picture into the core
> devs' feelings of what's right, and that they will do the "right" thing
> in general, by the average understanding of the word "right" among most
> current philosophies - and I imagine that's really all they wished to say.
>
> To add to that, if there is one thing we (as free thinkers) hold in
> highest regard, it's not being forced to do anything; not being
> commanded; not having to bend to another will or doctrine. So I say keep
> it.
>
>
>
> PS: I could never comply with rule 63.  :)
>
>
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Regarding CoC

2018-10-22 Thread J Decker
On Mon, Oct 22, 2018 at 12:22 PM R Smith  wrote:

>
> On 2018/10/22 7:09 PM, Simon Slavin wrote:
> >
> > If you're not going to accept those rules, in exactly the translation
> used, you might as well pick something entirely different.
> >
> > Simon.
>
> Indeed. Further to this, as I understand a CoC, it's basically the core
> entity informing whomever be so interested, how he/she/they aim to
> conduct themselves in the fulfillment of duties or business.
>
> I do not think it proscribes or prescribes to anyone else.
>
> For me, speaking as the avid Atheist I am, the specific rule-set in
> question is weird, but it also provides a great picture into the core
> devs' feelings of what's right, and that they will do the "right" thing
> in general, by the average understanding of the word "right" among most
> current philosophies - and I imagine that's really all they wished to say.
>
> To add to that, if there is one thing we (as free thinkers) hold in
> highest regard, it's not being forced to do anything; not being
> commanded; not having to bend to another will or doctrine. So I say keep
> it.
>

59.  Fulfill not the desires of the flesh; hate your own will.
:)

>
>
>
> PS: I could never comply with rule 63.  :)
>
>
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>

On Mon, Oct 22, 2018 at 12:22 PM R Smith  wrote:

>
> On 2018/10/22 7:09 PM, Simon Slavin wrote:
> >
> > If you're not going to accept those rules, in exactly the translation
> used, you might as well pick something entirely different.
> >
> > Simon.
>
> Indeed. Further to this, as I understand a CoC, it's basically the core
> entity informing whomever be so interested, how he/she/they aim to
> conduct themselves in the fulfillment of duties or business.
>
> I do not think it proscribes or prescribes to anyone else.
>
> For me, speaking as the avid Atheist I am, the specific rule-set in
> question is weird, but it also provides a great picture into the core
> devs' feelings of what's right, and that they will do the "right" thing
> in general, by the average understanding of the word "right" among most
> current philosophies - and I imagine that's really all they wished to say.
>
> To add to that, if there is one thing we (as free thinkers) hold in
> highest regard, it's not being forced to do anything; not being
> commanded; not having to bend to another will or doctrine. So I say keep
> it.
>
>
>
> PS: I could never comply with rule 63.  :)
>
>
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Regarding CoC

2018-10-22 Thread R Smith


On 2018/10/22 7:09 PM, Simon Slavin wrote:


If you're not going to accept those rules, in exactly the translation used, you 
might as well pick something entirely different.

Simon.


Indeed. Further to this, as I understand a CoC, it's basically the core 
entity informing whomever be so interested, how he/she/they aim to 
conduct themselves in the fulfillment of duties or business.


I do not think it proscribes or prescribes to anyone else.

For me, speaking as the avid Atheist I am, the specific rule-set in 
question is weird, but it also provides a great picture into the core 
devs' feelings of what's right, and that they will do the "right" thing 
in general, by the average understanding of the word "right" among most 
current philosophies - and I imagine that's really all they wished to say.


To add to that, if there is one thing we (as free thinkers) hold in 
highest regard, it's not being forced to do anything; not being 
commanded; not having to bend to another will or doctrine. So I say keep 
it.




PS: I could never comply with rule 63.  :)


___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] unsubscribe

2018-10-22 Thread ThomGrayRome

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Regarding CoC

2018-10-22 Thread Peter da Silva
You would have had more luck with "Be excellent to each other".
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Custom serialization/deserialization of in-memory DB

2018-10-22 Thread Simon Slavin
On 22 Oct 2018, at 7:30pm, Zoltan Demeter  wrote:

> Or if I could tell SQLite to use custom file I/O routines ... I could mock 
> fwrite() to just write to memory and then grab the data.

You can tell indeed SQLite to use custom file I/O routines ... by writing your 
own virtual filesystem (VFS):



It's not for the faint-hearted, but it does allow you to do anything you want 
instead of using your operating system's normal file system.  So you could 
write to reserved memory, or write to a custom-formatted Flash drive, or 
transmit it via your device's satellite feed.

Several example VFS implementations are included in the /full/ download of 
SQLite (not the amalgamation download).  You might want to look at 
test_onefile.c as documented here:



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


Re: [sqlite] Custom serialization/deserialization of in-memory DB

2018-10-22 Thread Shawn Wagner
https://www.sqlite.org/c3ref/serialize.html might help.

On Mon, Oct 22, 2018, 11:31 AM Zoltan Demeter  wrote:

> Hello there,
>
> I am working on a small plugin for a bigger application. I am bound by
> the in-house app framework, for example I cannot create arbitrary
> files or use anything OS-specific directly.
>
> I am using SQLite with an in-memory DB to obtain sorted, filtered
> lists of items. I am happy with the library. The only problem is, the
> amount of data can be so huge, that it takes a considerable amount of
> time to calculate some of the fields and build up the DB.
>
> Thus, I would like to save my tables, but the "normal" backup API
> wants to use a file. Like I wrote, I cannot use an arbitrary file, my
> load/save procedure must be integrated into the app framework so that
> all data will be packed into the project data file(s).
>
> Basically, if I could obtain a byte array, I could save it to disk.
> Load and save should work across bitness and OS barriers ... eg.
> between 32-bit Windows and 64-bit Mac.
>
> Or if I could tell SQLite to use custom file I/O routines ... I could
> mock fwrite() to just write to memory and then grab the data.
>
> A "simple" table dump, without indices etc. would be already be great.
>
> Any ideas please?
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Regarding CoC

2018-10-22 Thread Don V Nielsen
I really feel for you, DRH. You tried covering all the bases,
unfortunately, you going to get tagged out at everyone because everybody is
referee and they all follow their own rules.This goes straight to your
first point, "What is professional to some might be unprofessional to
others." This akin to people saying, "What good is religion because I am a
good person." Oh, yah? By whose measure? Their own. And that measure varies
from person to person. You reached to higher higher authority through St
Benedictine. But others don't agree with the authority. So they are going
to insist that it gets thrown out because they don't agree.

Your third point is the heart of the problem, "having a written CoC is
increasingly a business requirement". I read this as, "you felt the
pressure from significant businesses". Being global opens a wasps nest. We
all have to be inclusive, but all groups demand recognition. In plain
English, "You are damned if you do and damned if you don't." In the end,
you cannot win this.

IMO, you're best bet is to fold your hand and keep your chips you have in
front of you. You have made your feelings known. For those who have read
the CoC and share in your community, we will accept CoC changes that
eliminate those elements others are insulted by. That's just who we are.
But we know where they came from.

Lastly, props to Rowan Worth. "> 23. Do not nurse a grudge. ::sigh:: DROP
TABLE grudges; I was amassing such a good collection :(" Totally awesome
comment. I wish there was a like button for that.

On Mon, Oct 22, 2018 at 10:29 AM Richard Hipp  wrote:

> On 10/22/18, Chris Brody  wrote:
> >> Looks like that happened this morning.
> >> https://news.ycombinator.com/item?id=18273530
> >
> > I saw it coming, tried to warn you guys in private.
>
> There is indeed a reactionary hate mob forming on twitter.  But most
> of the thoughtful commentators have been supportive, even if they
> disagree with the particulars of our CoC, They total get that we are
> not being exclusive, but rather setting a standard of behavior for
> participation in the SQLite community.
>
> I have tried to make that point clear in the preface to the CoC, that
> we have no intention of enforcing any particular religious system on
> anybody, and that everyone is welcomed to participate in the community
> regardless of ones religious proclivities.  The only requirement is
> that while participating in the SQLite community, your behavior not be
> in direct conflict with time-tested and centuries-old Christian
> ethics.  Nobody has to adhere to a particular creed.  Merely
> demonstrate professional behavior and all is well.
>
> Many detractors appear to have not read the preface, or if they read
> it, they did not understand it.  This might be because I have not
> explained it well.  The preface has been revised, months ago, to
> address prior criticism from the twitter crowd.  I think the current
> preface is definitely an improvement over what was up at first.  But,
> there might be ways of improving it further.  Thoughtful suggestions
> are welcomed.
>
> So the question then arises:  If strict adherence to the Rule of St.
> Benedict is not required, why even have a CoC?
>
> Several reasons:  First, "professional behavior" is ill-defined.  What
> is professional to some might be unprofessional to others.  The Rule
> attempts to clarify what "professional behavior" means.  When I was
> first trying to figure out what CoC to use (under pressure from
> clients) I also considered secular sources, such as Benjamin
> Franklin's 13 virtues (http://www.thirteenvirtues.com/) but ended up
> going with the Instruments of Good Works from St. Benedict's Rule as
> it provide more examples.
>
> Secondly, I view a CoC not so much as a legal code as a statement of
> the values of the core developers.  All current committers to SQLite
> approved the CoC before I published it.  A single dissent would have
> been sufficient for me to change course.  Taking down the current CoC
> would not change our values, it would merely obscure them.  Isn't it
> better to be open and honest about who we are?
>
> Thirdly, having a written CoC is increasingly a business requirement.
> (I published the currrent CoC after two separate business requested
> copies of our company CoC.  They did not say this was a precondition
> for doing business with them, but there was that implication.) There
> has been an implicit code of conduct for SQLite from the beginning,
> and almost everybody has gotten along with it just fine.  Once or
> twice I have had to privately reprove offenders, but those are rare
> exceptions.  Publishing the current CoC back in February is merely
> making explicit what has been implicit from the beginning.  Nothing
> has really changed.  I did not draw attention to the CoC back in
> February because all I really needed then was a hyperlink to send to
> those who were specifically curious.
>
> So then, why not use a more modern CoC?  I looked at 

[sqlite] Custom serialization/deserialization of in-memory DB

2018-10-22 Thread Zoltan Demeter
Hello there,

I am working on a small plugin for a bigger application. I am bound by
the in-house app framework, for example I cannot create arbitrary
files or use anything OS-specific directly.

I am using SQLite with an in-memory DB to obtain sorted, filtered
lists of items. I am happy with the library. The only problem is, the
amount of data can be so huge, that it takes a considerable amount of
time to calculate some of the fields and build up the DB.

Thus, I would like to save my tables, but the "normal" backup API
wants to use a file. Like I wrote, I cannot use an arbitrary file, my
load/save procedure must be integrated into the app framework so that
all data will be packed into the project data file(s).

Basically, if I could obtain a byte array, I could save it to disk.
Load and save should work across bitness and OS barriers ... eg.
between 32-bit Windows and 64-bit Mac.

Or if I could tell SQLite to use custom file I/O routines ... I could
mock fwrite() to just write to memory and then grab the data.

A "simple" table dump, without indices etc. would be already be great.

Any ideas please?
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Regarding CoC

2018-10-22 Thread Klaus Maas

Funny world that one needs a code of contact to be considered civilized.

No need to defend your CoC.

I see it as a non-exhaustive list of values important to the developers.

That they are Christian-based gives some context for their interpretation.

Can't see any fault in that.

I may or may not share some/all/any of these values, but I should 
respect their significance for the developers.


Klaus

On 22/10/2018 18.32, Chris Brody wrote:

I would vote for a major simplification, down to something like "love
thy neighbor", "do unto others as ...", or "don't do unto others as
..."

For reference:
*https://www.simpletoremember.com/jewish/blog/loving-thy-neighbor-judaism/
*https://www.biblegateway.com/passage/?search=Galatians+5%3A14=KJV
On Mon, Oct 22, 2018 at 12:26 PM Simon Slavin  wrote:

On 22 Oct 2018, at 1:19pm, Richard Hipp  wrote:


Looks like that happened this morning.
https://news.ycombinator.com/item?id=18273530

It also hit Reddit, in /r/programming.  Currently 239 comments:



Simon.


___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] R*Tree performance

2018-10-22 Thread Zoltan Demeter
Hello there,

thanks for the responses. Indeed, I don't have anything to compare the
performance to.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Regarding CoC

2018-10-22 Thread David Raymond
For feedback from one more random person on the internet: I'll let you know 
that the CoC as it currently stands, along with your reasoning below, brings a 
smile to my face and restores a small bit of faith in humanity to my heart.


-Original Message-
From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On 
Behalf Of Richard Hipp
Sent: Monday, October 22, 2018 11:29 AM
To: SQLite mailing list
Subject: Re: [sqlite] Regarding CoC

On 10/22/18, Chris Brody  wrote:
>> Looks like that happened this morning.
>> https://news.ycombinator.com/item?id=18273530
>
> I saw it coming, tried to warn you guys in private.

There is indeed a reactionary hate mob forming on twitter.  But most
of the thoughtful commentators have been supportive, even if they
disagree with the particulars of our CoC, They total get that we are
not being exclusive, but rather setting a standard of behavior for
participation in the SQLite community.

I have tried to make that point clear in the preface to the CoC, that
we have no intention of enforcing any particular religious system on
anybody, and that everyone is welcomed to participate in the community
regardless of ones religious proclivities.  The only requirement is
that while participating in the SQLite community, your behavior not be
in direct conflict with time-tested and centuries-old Christian
ethics.  Nobody has to adhere to a particular creed.  Merely
demonstrate professional behavior and all is well.

Many detractors appear to have not read the preface, or if they read
it, they did not understand it.  This might be because I have not
explained it well.  The preface has been revised, months ago, to
address prior criticism from the twitter crowd.  I think the current
preface is definitely an improvement over what was up at first.  But,
there might be ways of improving it further.  Thoughtful suggestions
are welcomed.

So the question then arises:  If strict adherence to the Rule of St.
Benedict is not required, why even have a CoC?

Several reasons:  First, "professional behavior" is ill-defined.  What
is professional to some might be unprofessional to others.  The Rule
attempts to clarify what "professional behavior" means.  When I was
first trying to figure out what CoC to use (under pressure from
clients) I also considered secular sources, such as Benjamin
Franklin's 13 virtues (http://www.thirteenvirtues.com/) but ended up
going with the Instruments of Good Works from St. Benedict's Rule as
it provide more examples.

Secondly, I view a CoC not so much as a legal code as a statement of
the values of the core developers.  All current committers to SQLite
approved the CoC before I published it.  A single dissent would have
been sufficient for me to change course.  Taking down the current CoC
would not change our values, it would merely obscure them.  Isn't it
better to be open and honest about who we are?

Thirdly, having a written CoC is increasingly a business requirement.
(I published the currrent CoC after two separate business requested
copies of our company CoC.  They did not say this was a precondition
for doing business with them, but there was that implication.) There
has been an implicit code of conduct for SQLite from the beginning,
and almost everybody has gotten along with it just fine.  Once or
twice I have had to privately reprove offenders, but those are rare
exceptions.  Publishing the current CoC back in February is merely
making explicit what has been implicit from the beginning.  Nothing
has really changed.  I did not draw attention to the CoC back in
February because all I really needed then was a hyperlink to send to
those who were specifically curious.

So then, why not use a more modern CoC?  I looked at that too, but
found the so-called "modern" CoCs to be vapid.  They are trendy
feel-good statements that do not really get to the heart of the matter
in the way the the ancient Rule does.  By way of analogy, I view
modern CoCs as being like pop music - selling millions of copies today
and completely forgotten next year.  I prefer something more enduring,
like Mozart.

One final reason for publishing the current CoC is as a preemptive
move, to prevent some future customer from imposing on us one of those
modern CoCs that I so dislike.

In summary: The values expressed by the current CoC have been
unchanged for decades and will not be changing as we move forward.  If
some people are uncomfortable with those values, then I am very sorry
for them, but that does not change the fact.  On the other hand, I am
open to suggestions on how to express those values in a way that
modern twitter-ites can better understand, so do not hesitate to speak
up if you have a plan.
-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
___

Re: [sqlite] Regarding CoC

2018-10-22 Thread Rob Dixon
SQLite lost a lot of credibility with a lot of people over this stunt. I
know you think it doesn’t matter, but SQLite is a brand- this tarnishes
that brand and makes life more difficult for those of us who need to
justify using it to project stakeholders. If it is a serious CoC,
stakeholders see a red flag because they don’t want tech held hostage by
perceived religious fanatics. If it is a joke stakeholders think the tech
itself is unprofessional. It’s a lose-lose situation, and I’m wondering if
taking on a culture of vapid CoCs worth tarnishing your brand name over?

On Mon, Oct 22, 2018 at 9:29 AM Richard Hipp  wrote:

> On 10/22/18, Chris Brody  wrote:
> >> Looks like that happened this morning.
> >> https://news.ycombinator.com/item?id=18273530
> >
> > I saw it coming, tried to warn you guys in private.
>
> There is indeed a reactionary hate mob forming on twitter.  But most
> of the thoughtful commentators have been supportive, even if they
> disagree with the particulars of our CoC, They total get that we are
> not being exclusive, but rather setting a standard of behavior for
> participation in the SQLite community.
>
> I have tried to make that point clear in the preface to the CoC, that
> we have no intention of enforcing any particular religious system on
> anybody, and that everyone is welcomed to participate in the community
> regardless of ones religious proclivities.  The only requirement is
> that while participating in the SQLite community, your behavior not be
> in direct conflict with time-tested and centuries-old Christian
> ethics.  Nobody has to adhere to a particular creed.  Merely
> demonstrate professional behavior and all is well.
>
> Many detractors appear to have not read the preface, or if they read
> it, they did not understand it.  This might be because I have not
> explained it well.  The preface has been revised, months ago, to
> address prior criticism from the twitter crowd.  I think the current
> preface is definitely an improvement over what was up at first.  But,
> there might be ways of improving it further.  Thoughtful suggestions
> are welcomed.
>
> So the question then arises:  If strict adherence to the Rule of St.
> Benedict is not required, why even have a CoC?
>
> Several reasons:  First, "professional behavior" is ill-defined.  What
> is professional to some might be unprofessional to others.  The Rule
> attempts to clarify what "professional behavior" means.  When I was
> first trying to figure out what CoC to use (under pressure from
> clients) I also considered secular sources, such as Benjamin
> Franklin's 13 virtues (http://www.thirteenvirtues.com/) but ended up
> going with the Instruments of Good Works from St. Benedict's Rule as
> it provide more examples.
>
> Secondly, I view a CoC not so much as a legal code as a statement of
> the values of the core developers.  All current committers to SQLite
> approved the CoC before I published it.  A single dissent would have
> been sufficient for me to change course.  Taking down the current CoC
> would not change our values, it would merely obscure them.  Isn't it
> better to be open and honest about who we are?
>
> Thirdly, having a written CoC is increasingly a business requirement.
> (I published the currrent CoC after two separate business requested
> copies of our company CoC.  They did not say this was a precondition
> for doing business with them, but there was that implication.) There
> has been an implicit code of conduct for SQLite from the beginning,
> and almost everybody has gotten along with it just fine.  Once or
> twice I have had to privately reprove offenders, but those are rare
> exceptions.  Publishing the current CoC back in February is merely
> making explicit what has been implicit from the beginning.  Nothing
> has really changed.  I did not draw attention to the CoC back in
> February because all I really needed then was a hyperlink to send to
> those who were specifically curious.
>
> So then, why not use a more modern CoC?  I looked at that too, but
> found the so-called "modern" CoCs to be vapid.  They are trendy
> feel-good statements that do not really get to the heart of the matter
> in the way the the ancient Rule does.  By way of analogy, I view
> modern CoCs as being like pop music - selling millions of copies today
> and completely forgotten next year.  I prefer something more enduring,
> like Mozart.
>
> One final reason for publishing the current CoC is as a preemptive
> move, to prevent some future customer from imposing on us one of those
> modern CoCs that I so dislike.
>
> In summary: The values expressed by the current CoC have been
> unchanged for decades and will not be changing as we move forward.  If
> some people are uncomfortable with those values, then I am very sorry
> for them, but that does not change the fact.  On the other hand, I am
> open to suggestions on how to express those values in a way that
> modern twitter-ites can better understand, so do not 

Re: [sqlite] Regarding CoC

2018-10-22 Thread Petite Abeille


> On Oct 22, 2018, at 5:29 PM, Richard Hipp  wrote:
> 
> In summary

Leave it as it is, no one is going to loose sleep over it. Now, about that 
MERGE command... :)

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Regarding CoC

2018-10-22 Thread Simon Slavin
On 22 Oct 2018, at 5:32pm, someone wrote:

> I would vote for a major simplification

There's no point.  The point of the code a posted is that it is a direct copy 
of the code of St. Benedict, the rules (allowing for translation from the 
Latin) which have been accepted by Benedictine monks for 1300 years.  In that 
time the rules were debated, by people of all religions and none, far more 
cleverly and amusingly than I've seen in the past week on the internet.

If you're not going to accept those rules, in exactly the translation used, you 
might as well pick something entirely different.

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


Re: [sqlite] Regarding CoC

2018-10-22 Thread Chris Brody
I would vote for a major simplification, down to something like "love
thy neighbor", "do unto others as ...", or "don't do unto others as
..."

For reference:
* https://www.simpletoremember.com/jewish/blog/loving-thy-neighbor-judaism/
* https://www.biblegateway.com/passage/?search=Galatians+5%3A14=KJV
On Mon, Oct 22, 2018 at 12:26 PM Simon Slavin  wrote:
>
> On 22 Oct 2018, at 1:19pm, Richard Hipp  wrote:
>
> > Looks like that happened this morning.
> > https://news.ycombinator.com/item?id=18273530
>
> It also hit Reddit, in /r/programming.  Currently 239 comments:
>
> 
>
> Simon.
>
>
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Regarding CoC

2018-10-22 Thread Simon Slavin
On 22 Oct 2018, at 1:19pm, Richard Hipp  wrote:

> Looks like that happened this morning.
> https://news.ycombinator.com/item?id=18273530

It also hit Reddit, in /r/programming.  Currently 239 comments:



Simon.


___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Regarding CoC

2018-10-22 Thread Richard Hipp
On 10/22/18, Chris Brody  wrote:
>> Looks like that happened this morning.
>> https://news.ycombinator.com/item?id=18273530
>
> I saw it coming, tried to warn you guys in private.

There is indeed a reactionary hate mob forming on twitter.  But most
of the thoughtful commentators have been supportive, even if they
disagree with the particulars of our CoC, They total get that we are
not being exclusive, but rather setting a standard of behavior for
participation in the SQLite community.

I have tried to make that point clear in the preface to the CoC, that
we have no intention of enforcing any particular religious system on
anybody, and that everyone is welcomed to participate in the community
regardless of ones religious proclivities.  The only requirement is
that while participating in the SQLite community, your behavior not be
in direct conflict with time-tested and centuries-old Christian
ethics.  Nobody has to adhere to a particular creed.  Merely
demonstrate professional behavior and all is well.

Many detractors appear to have not read the preface, or if they read
it, they did not understand it.  This might be because I have not
explained it well.  The preface has been revised, months ago, to
address prior criticism from the twitter crowd.  I think the current
preface is definitely an improvement over what was up at first.  But,
there might be ways of improving it further.  Thoughtful suggestions
are welcomed.

So the question then arises:  If strict adherence to the Rule of St.
Benedict is not required, why even have a CoC?

Several reasons:  First, "professional behavior" is ill-defined.  What
is professional to some might be unprofessional to others.  The Rule
attempts to clarify what "professional behavior" means.  When I was
first trying to figure out what CoC to use (under pressure from
clients) I also considered secular sources, such as Benjamin
Franklin's 13 virtues (http://www.thirteenvirtues.com/) but ended up
going with the Instruments of Good Works from St. Benedict's Rule as
it provide more examples.

Secondly, I view a CoC not so much as a legal code as a statement of
the values of the core developers.  All current committers to SQLite
approved the CoC before I published it.  A single dissent would have
been sufficient for me to change course.  Taking down the current CoC
would not change our values, it would merely obscure them.  Isn't it
better to be open and honest about who we are?

Thirdly, having a written CoC is increasingly a business requirement.
(I published the currrent CoC after two separate business requested
copies of our company CoC.  They did not say this was a precondition
for doing business with them, but there was that implication.) There
has been an implicit code of conduct for SQLite from the beginning,
and almost everybody has gotten along with it just fine.  Once or
twice I have had to privately reprove offenders, but those are rare
exceptions.  Publishing the current CoC back in February is merely
making explicit what has been implicit from the beginning.  Nothing
has really changed.  I did not draw attention to the CoC back in
February because all I really needed then was a hyperlink to send to
those who were specifically curious.

So then, why not use a more modern CoC?  I looked at that too, but
found the so-called "modern" CoCs to be vapid.  They are trendy
feel-good statements that do not really get to the heart of the matter
in the way the the ancient Rule does.  By way of analogy, I view
modern CoCs as being like pop music - selling millions of copies today
and completely forgotten next year.  I prefer something more enduring,
like Mozart.

One final reason for publishing the current CoC is as a preemptive
move, to prevent some future customer from imposing on us one of those
modern CoCs that I so dislike.

In summary: The values expressed by the current CoC have been
unchanged for decades and will not be changing as we move forward.  If
some people are uncomfortable with those values, then I am very sorry
for them, but that does not change the fact.  On the other hand, I am
open to suggestions on how to express those values in a way that
modern twitter-ites can better understand, so do not hesitate to speak
up if you have a plan.
-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Regarding CoC

2018-10-22 Thread Chris Brody
> Looks like that happened this morning.
> https://news.ycombinator.com/item?id=18273530

I saw it coming, tried to warn you guys in private.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Regarding CoC

2018-10-22 Thread Mantas Gridinas
To be fair, internet is considered to be series of reposts.

On Mon, Oct 22, 2018, 15:20 Richard Hipp  On 10/19/18, Simon Slavin  wrote:
> >
> > Yeah, that's gonna magically appear on Hacker News within the month.  For
> > those curious ...
> >
>
> Looks like that happened this morning.
> https://news.ycombinator.com/item?id=18273530
>
> --
> D. Richard Hipp
> d...@sqlite.org
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] R*Tree performance

2018-10-22 Thread Dominique Devienne
On Mon, Oct 22, 2018 at 2:03 PM Richard Hipp  wrote:

> On 10/22/18, Zoltan Demeter  wrote:
> > I have a rather poor performance of 50 k inserts per second. The data
> > to be inserted is precalculated and passed to the loop. I am using the
> > same logic as above, so the loop is wrapped in a transaction and I use
> > a parametrized statement.
> [...].  Have you compared the RTree insert performance in SQLite against
> other systems?
> Is SQLite a serious laggard here?  Do  we need to work on it?
>

I wrote the wiki-entry below 10 years ago (March 19, 2008 :)),
after evaluating Oracle Spatial 11g (using OCI and C++).
That was a 55x slowdown, while you report a 24x slowdown with SQLite.
I bet things have improved Oracle-side since then, but I don't know.
Still, that's only a 2x difference between the two in terms of slowdown, so
in the same ballpark I'd say. FWIW. --DD
--
Issue#1: Number-based
The SDO_GEOMETRY stores all coordinates with the Number SQL type (OCINumber
struct in OCI),
which is 21 bytes long and base-10 based. When binding floating point
values of type float, Oracle tends to add noise around the 6th significant
digit...

Issue#2: Slow inserts with Spatial Indexes
When an SDO_GEOMETRY column has a Spatial index associated to it (usually
the case, otherwise you can't use Spatial operator on it), this can slow
down inserts quite a bit...
For example, inserting 10,000 2D points using an OCI array-bind insert
takes only 0.2 seconds without a Spatial index, but a whopping 11 second
with one.
It appears that the single array-insert if followed by 10,000 individual
inserts into an internal Spatial table, probably later use to update the
index on commit
(which itself adds only around 1 second when processing rows 1,000 at a
time, the default, or just 0.35 second 10,000 at a time).
No news from the Spatial team since reporting this issue.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Regarding CoC

2018-10-22 Thread Richard Hipp
On 10/19/18, Simon Slavin  wrote:
>
> Yeah, that's gonna magically appear on Hacker News within the month.  For
> those curious ...
>

Looks like that happened this morning.
https://news.ycombinator.com/item?id=18273530

-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] R*Tree performance

2018-10-22 Thread Richard Hipp
On 10/22/18, Zoltan Demeter  wrote:
>
> I have a rather poor performance of 50 k inserts per second. The data
> to be inserted is precalculated and passed to the loop. I am using the
> same logic as above, so the loop is wrapped in a transaction and I use
> a parametrized statement.
>

Inserting into an ordinary table with indexes is basically just
appending a single record onto the end of the file.  Inserting into
RTree index is a lot more work, involving updates to multple records
scattered all across the database file.  One expects an RTree index
insert to be somewhat slower.

On the other hand, I do not recall ever spending any time trying to
optimize RTree insert, as most of our clients are more concerned with
query performance.  Have you compared the RTree insert performance in
SQLite against other systems?  Is SQLite a serious laggard here?  Do
we need to work on it?

-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] help, sqlite3_get_table return 21,

2018-10-22 Thread Richard Hipp
On 10/22/18, W J  wrote:
> Hello ,
>
> I'm using sqlite3_get_table() to query some information from sqlite. but
> sometimes( not every time), I got error return value: 21.
> #define SQLITE_MISUSE  21   /* Library used incorrectly */
>
> What is the real meaning of this error? How to correct it?
>

It means that you are violating the rules in some way.  SQLite is nice
and returned error 21 instead of segfaulting.

To get more information, run your application in a debugger and set a
breakpoint on the sqlite3MisuseError() function.  Then show us a stack
trace when that breakpoint is hit.

-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQLITE_ENABLE_DBSTAT_VTAB

2018-10-22 Thread Richard Hipp
On 10/22/18, Olivier Mascia  wrote:
>
> Does compiling SQLite with SQLITE_ENABLE_DBSTAT_VTAB has a performance
> impact of any sort?

No.  Not that is measurable.  Anytime you change a library in any way,
there is always some performance impact (which might be positive or
negative) due to changes in processor cache behavior, but that
differences is way, way down in the noise.
-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] help, sqlite3_get_table return 21,

2018-10-22 Thread W J
Hello ,

I'm using sqlite3_get_table() to query some information from sqlite. but 
sometimes( not every time), I got error return value: 21.
#define SQLITE_MISUSE  21   /* Library used incorrectly */

the version information is follow:
#define SQLITE_VERSION"3.8.4.3"
#define SQLITE_VERSION_NUMBER 3008004
#define SQLITE_SOURCE_ID  "2014-04-03 16:53:12 
a611fa96c4a848614efe899130359c9f6fb889c3"

What is the real meaning of this error? How to correct it?

thanks very much for your reply.

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] SQLITE_ENABLE_DBSTAT_VTAB

2018-10-22 Thread Olivier Mascia
Hello,

Does compiling SQLite with SQLITE_ENABLE_DBSTAT_VTAB has a performance impact 
of any sort?

-- 
Best Regards, Meilleures salutations, Met vriendelijke groeten,
Olivier Mascia, http://integral.software


___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] R*Tree performance

2018-10-22 Thread Zoltan Demeter
Hello there,

I would like to get an idea, what (insert) performance I could expect
when building a 3-dimensional (float) R*Tree.

I am using SQLite as a static lib, compiled with the following defines:
"SQLITE_ENABLE_RTREE" "SQLITE_OMIT_DEPRECATED" "SQLITE_THREADSAFE=2"
"SQLITE_MAX_EXPR_DEPTH=0"

The test I performed was on Win7 64-bit.
I am using an in-memory DB. The PC has lots of RAM.

I have 3 tables:
points consists of an implicit rowid and 3 real columns
elemenst consists of 4 integer columns, referencing a points rowid each.

Populating the above tables from an array of data goes with a speed of
approx. 1.2 M elements per second. I am happy with this. I have a
transaction wrapped around a for loop where I bind the parameters and
execute the parametrized query, inserting one row at a time.

Now, I created a table for spatial lookups:
create virtual table boundingboxes using rtree (elemID, minX, maxX,
minY, maxY, minZ, maxZ);

I have a rather poor performance of 50 k inserts per second. The data
to be inserted is precalculated and passed to the loop. I am using the
same logic as above, so the loop is wrapped in a transaction and I use
a parametrized statement.

Is this the performance I can expect, compared to more than a million
inserts into a "simple" table? Could I do something better?

thanks in advance
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] segmentation fault in sqlite api call

2018-10-22 Thread Olivier Mascia
Your query string is ~ 61 characters (did not count precisely), not including 
the key length not the value length. Are you sure the real tests you run do not 
overflow the fixed buffer char query[200] which can hold no more than 199 
characters?  You would have huge problems as soon as strlen(key) + 
strlen(query) > ~139.

Besides, there is still no point passing a char** to mydef_set().
You might as well have:
> int mydef_set(sqlite3 *db,char *key, char *value)
and call it as:
> mydef_set(db,"sssi",val);

And the code for mod_init() copied from your initial email can't be the code 
you compile along the remaining bits of the sample you provided. That function 
expect db to be a global, yet it returns it after changing it, it frees a query 
which was nowhere declared/allocated,...

I sincerely think what you are looking at are weird bugs in your code, and you 
might be loosing precious time wondering what might go wrong in SQLite code : 
anything and everything if the caller plays fool.

If you want some more help from the community, I suggest you should write a 
short self-contained sample as you tried to do, but this time check that it 
compiles fine (what you showed until now can't possibly even compile), and run 
and produces the same problem as your real program then show it.  Please also 
tell what your platform is and how is SQLite linked to your code (static lib, 
dynamic lib, or compiled in along with your project code).

-- 
Best Regards, Meilleures salutations, Met vriendelijke groeten,
Olivier Mascia

> sqlite3 *mod_init() {
> 
>/* Open database */
>//rc = sqlite3_open("test.db", >db);
>lastError = sqlite3_open_v2("test.db", , SQLITE_OPEN_READWRITE |
> SQLITE_OPEN_CREATE | SQLITE_OPEN_SHAREDCACHE|SQLITE_OPEN_NOMUTEX , NULL);
>if( lastError ) {
>fprintf(stderr, "Can't open database: %s\n",
> sqlite3_errmsg(dbObj->db));
>free(query);
>return(0);
>} else {
>fprintf(stdout, "Opened database successfully\n");
>}
>memset(query,0,200);
>strcpy(query,"CREATE TABLE IF NOT EXISTS cosmos_db("  \
>"key   TEXT PRIMARY KEY   NOT NULL," \
>"valueVARCHAR(100));");
> 
>/* Execute SQL statement */
>lastError = sqlite3_exec(db, query, 0, 0, );
> 
> 
>if( lastError != SQLITE_OK ){
>fprintf(stderr, "SQL error: %s\n", zErrMsg);
>sqlite3_free(zErrMsg);
>} else {
>fprintf(stdout, "Table created successfully\n");
>}
> return db;
> }
> 

> Le 22 oct. 2018 à 07:15, Ratheendran R  a écrit :
> 
> int mydef_set(sqlite3 *db,char *key, char **value)
> {
>char *zErrMsg = 0;
>int rc;
>char query[200]
>sprintf(query,"INSERT OR REPLACE INTO cosmos_db (key,value) values
> ('%s', '%s');",key,*value);
>/* Execute SQL statement */
>lastError = sqlite3_exec(db, query, 0, 0, );
>if( lastError != SQLITE_OK ) {
>  fprintf(stderr, "SQL error: %s\n", zErrMsg);
>  sqlite3_free(zErrMsg);
>   } else {
>  fprintf(stdout, "Update done successfully\n");
>   }
>return lastError;
> }
> 
> 
> int main()
> {
> 
> 
>sqlite3 *db;
>db=mod_init();
>char *val=malloc(1000);
>//strcpy(val,
>char dest[]="axzchsdjzcjsdjdcfsjhgfcshgsdfgsfg h
> dbhjbbssdfsdsgffjhdsgfjg";
>strcpy(val,dest);
> 
>mydef_set(db,"sssi",);
> 
> }



___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users