Re: [sqlite] Version of the database

2016-05-26 Thread Richard Hipp
On 5/26/16, John G  wrote:
> I don't see  the '.dbinfo' command in the shell in the version supplied
> with MacOS X 10.10 (Yosemite) - 3.8.8.3.
> Was this introduced after this.

Added in 3.8.9 (2015-04-08)


-- 
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] Version of the database

2016-05-26 Thread Simon Slavin

On 26 May 2016, at 5:31pm, John G  wrote:

> Was this introduced after this.

Yes, it's a very recent new thing.

> I know Apple is a bit slow in updating, but I can't use a personally
> compiled verion.

Download the precompiled version from the "Precompiled Binaries" section on the 
download page.

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


Re: [sqlite] Version of the database

2016-05-26 Thread John G
I don't see  the '.dbinfo' command in the shell in the version supplied
with MacOS X 10.10 (Yosemite) - 3.8.8.3.
Was this introduced after this.
I know Apple is a bit slow in updating, but I can't use a personally
compiled verion.
John G



On 5 May 2016 at 23:42, R Smith  wrote:

> The file header contains the SQLite version that most recently modified
> the schema. You can see this using the cli, but not a pragma.
>
> If you are willing to dig a bit, you can retrieve it by reading the first
> 100 bytes or so from the file and examining the 4 bytes at offset 96. It's
> a big-endian 32-bit integer containing the version, and also another 32-bit
> integer (4-byte) value just prior at offset 92 is a counter of how many
> changes were made since using that library version. Together these can be
> quite useful information.
>
> The Integer value of the version would be a number like this: 3012034 -
> starting with a 3 always for SQLite3 and then the next 3 digits the minor
> version (12 in the example) and the last 3 the release (34 in the example).
>
> For more information on values stored in the header - see here:
> https://www.sqlite.org/fileformat2.html#database_header
>
> Cheers,
> Ryan
>
>
> On 2016/05/05 6:22 PM, Cecil Westerhof wrote:
>
>> 2016-05-05 18:15 GMT+02:00 Cecil Westerhof :
>>
>> I know how to get the version of the running version of SQLite, but is
>>> there a way to get the version with which the database was created?
>>>
>>> ​With the command line program I can get it with:
>>  .dbinfo
>> one of the things it gives is:
>>  software version:3008010
>> so it is 3.8.10,but would it also be possible to get in my Java program?
>>
>>
> ___
> 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] Version of the database

2016-05-06 Thread R Smith
The file header contains the SQLite version that most recently modified 
the schema. You can see this using the cli, but not a pragma.

If you are willing to dig a bit, you can retrieve it by reading the 
first 100 bytes or so from the file and examining the 4 bytes at offset 
96. It's a big-endian 32-bit integer containing the version, and also 
another 32-bit integer (4-byte) value just prior at offset 92 is a 
counter of how many changes were made since using that library version. 
Together these can be quite useful information.

The Integer value of the version would be a number like this: 3012034 - 
starting with a 3 always for SQLite3 and then the next 3 digits the 
minor version (12 in the example) and the last 3 the release (34 in the 
example).

For more information on values stored in the header - see here:
https://www.sqlite.org/fileformat2.html#database_header

Cheers,
Ryan


On 2016/05/05 6:22 PM, Cecil Westerhof wrote:
> 2016-05-05 18:15 GMT+02:00 Cecil Westerhof :
>
>> I know how to get the version of the running version of SQLite, but is
>> there a way to get the version with which the database was created?
>>
> ?With the command line program I can get it with:
>  .dbinfo
> one of the things it gives is:
>  software version:3008010
> so it is 3.8.10,but would it also be possible to get in my Java program?
>



[sqlite] Version of the database

2016-05-05 Thread Cecil Westerhof
2016-05-05 18:19 GMT+02:00 Simon Slavin :

>
> On 5 May 2016, at 5:15pm, Cecil Westerhof  wrote:
>
> > I know how to get the version of the running version of SQLite, but is
> > there a way to get the version with which the database was created?
>
> Unfortunately I do not think this information is stored anywhere.
>
> One often finds three version numbers stored:
>
> A) The version of the engine which was used to create the file.
> B) The earliest version of the engine which has made changes to the file.
> C) The latest version of the engine which has made changes to the file.
>
> I don't think SQLite stores any of these.
>

?Aah, OK. So the info I get with .dbinfo is about the program, not the file?

?

?At the moment I do not need the information. But I always like to be
prepared. ;-)

-- 
Cecil Westerhof


[sqlite] Version of the database

2016-05-05 Thread Simon Slavin

On 5 May 2016, at 5:38pm, Richard Hipp  wrote:

> There is no PRAGMA to retrieve this, but you can see it by
> running the ".dbinfo" command in the shell.

I was wrong.  Believe Richard, not me.

Simon.


[sqlite] Version of the database

2016-05-05 Thread Cecil Westerhof
2016-05-05 18:15 GMT+02:00 Cecil Westerhof :

>
> I know how to get the version of the running version of SQLite, but is
> there a way to get the version with which the database was created?
>

?With the command line program I can get it with:
.dbinfo
one of the things it gives is:
software version:3008010
so it is 3.8.10,but would it also be possible to get in my Java program?

-- 
Cecil Westerhof


[sqlite] Version of the database

2016-05-05 Thread Cecil Westerhof
I know how to get the version of the running version of SQLite, but is
there a way to get the version with which the database was created?

-- 
Cecil Westerhof


[sqlite] Version of the database

2016-05-05 Thread Simon Slavin

On 5 May 2016, at 5:22pm, Cecil Westerhof  wrote:

> ?With the command line program I can get it with:
>.dbinfo
> one of the things it gives is:
>software version:3008010

I don't know if this is from something stored in the file.  My guess is that 
it's more likely to be the version of SQLite in the shell tool you're using, 
using one of these:

SQLITE_EXTERN const char sqlite3_version[] :



the "sqlite_version()" function:



Simon.


[sqlite] Version of the database

2016-05-05 Thread Simon Slavin

On 5 May 2016, at 5:15pm, Cecil Westerhof  wrote:

> I know how to get the version of the running version of SQLite, but is
> there a way to get the version with which the database was created?

Unfortunately I do not think this information is stored anywhere.

One often finds three version numbers stored:

A) The version of the engine which was used to create the file.
B) The earliest version of the engine which has made changes to the file.
C) The latest version of the engine which has made changes to the file.

I don't think SQLite stores any of these.

Simon.


[sqlite] Version of the database

2016-05-05 Thread Richard Hipp
On 5/5/16, Simon Slavin  wrote:
>
> On 5 May 2016, at 5:15pm, Cecil Westerhof  wrote:
>
>> I know how to get the version of the running version of SQLite, but is
>> there a way to get the version with which the database was created?
>
> One often finds three version numbers stored:
>
> A) The version of the engine which was used to create the file.
> B) The earliest version of the engine which has made changes to the file.
> C) The latest version of the engine which has made changes to the file.
>
> I don't think SQLite stores any of these.

SQLite stores the version number of the last writer in the database
header.  There is no PRAGMA to retrieve this, but you can see it by
running the ".dbinfo" command in the shell.

-- 
D. Richard Hipp
drh at sqlite.org