Re: [sqlite] Row length in SQLITE

2020-01-24 Thread Deon Brewis
No I mean e.g.

row 1 = 500 bytes, 
row 2 = 600 bytes
row 3 = 80 bytes
row 4 = 300 bytes

etc.

Like the info that DBSTAT gives, but per row, not per page. This doesn't need 
to be performant - it's for usage analysis during development time.

- Deon

-Original Message-
From: sqlite-users  On Behalf Of 
Simon Slavin
Sent: Wednesday, January 22, 2020 5:24 PM
To: SQLite mailing list 
Subject: Re: [sqlite] Row length in SQLITE

On 22 Jan 2020, at 11:44pm, Deon Brewis  wrote:

> Is there any way to get the length of rows in a table / index in sqlite?

Do you mean the count of rows in a table / index ?

   SELECT count(*) FROM MyTable

There's no easy fast way to do this because SQLite doesn't keep that number 
handy anywhere.  It stores the entries in a tree and it would have to manually 
count the leaves of the tree.



Or do you mean the count of columns in a table / index ?

SELECT * FROM MyTable LIMIT 1

and count the number of columns returned.  Or in C

sqlite3_column_count()
___
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] List of innocuous functions?

2020-01-24 Thread Brian Curley
separate but somewhat related question, based on the response:

   Has any thought been given to updating the documentation to cover those
pragmas that have been upgraded to selectable entities?

I've only been able to find a handful of references along the way, such as
pragma_table_info, pragma_index_info, and the aforementioned
pragma_function_list, at least that I recall. Any sort of listing of what's
available like these?

I'd think that it would be helpful in the peanut gallery. Thanks!

Regards.

Brian P Curley



On Fri, Jan 24, 2020 at 4:12 PM Richard Hipp  wrote:

> SELECT DISTINCT name
>FROM pragma_function_list
>  WHERE (flags & 0x20)!=0
>  ORDER BY name;
>
> On 1/24/20, Peter Kolbus  wrote:
> > Is there any documentation showing, or an easy way to generate, the exact
> > list of SQLite-provided functions that are innocuous?
> >
> > I’d like to turn on the new SQLITE_TRUSTED_SCHEMA but support a variety
> of
> > applications and am hoping for something to guide analysis.
> >
> > Thanks
> > -Peter
> > ___
> > sqlite-users mailing list
> > sqlite-users@mailinglists.sqlite.org
> > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> >
>
>
> --
> 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] List of innocuous functions?

2020-01-24 Thread Richard Hipp
SELECT DISTINCT name
   FROM pragma_function_list
 WHERE (flags & 0x20)!=0
 ORDER BY name;

On 1/24/20, Peter Kolbus  wrote:
> Is there any documentation showing, or an easy way to generate, the exact
> list of SQLite-provided functions that are innocuous?
>
> I’d like to turn on the new SQLITE_TRUSTED_SCHEMA but support a variety of
> applications and am hoping for something to guide analysis.
>
> Thanks
> -Peter
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>


-- 
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] List of innocuous functions?

2020-01-24 Thread Peter Kolbus
Is there any documentation showing, or an easy way to generate, the exact list 
of SQLite-provided functions that are innocuous?

I’d like to turn on the new SQLITE_TRUSTED_SCHEMA but support a variety of 
applications and am hoping for something to guide analysis.

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


Re: [sqlite] ?==?utf-8?q? Sqlite 3.31.0 breaks firefox and thunderbird

2020-01-24 Thread Bernhard Rosenkraenzer
On Thursday, January 23, 2020 17:00 CET, Richard Hipp  wrote: 
 
> On 1/23/20, Bernhard Rosenkraenzer  wrote:
> > Hi,
> > after updating sqlite to 3.31.0, both firefox and thunderbird crash on
> > startup (rebuilding them against the newer sqlite doesn't help).
> 
> Is this related to https://bugzilla.mozilla.org/show_bug.cgi?id=1607902

Hi,
thanks for the pointer - it's indeed caused by that, and the fix mentioned 
there works (after some tweaking to make it apply on top of current firefox and 
thunderbird releases).

If anyone needs it, here's the fix adapted to current firefox and thunderbird 
releases.
https://github.com/OpenMandrivaAssociation/firefox/blob/master/firefox-72.0.2-sqlite-3.31.patch
https://github.com/OpenMandrivaAssociation/thunderbird/blob/master/thunderbird-68.4.1-sqlite-3.31.patch

ttyl
bero

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