-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 04/17/2010 11:57 AM, slowpoison wrote:
> I was unable to find a reference to how TEXT data types are stored in
> the db files.

2.3.1 and 2.3.2 answer that:

  http://www.sqlite.org/fileformat.html#varint_format

> I want to know whether a TEXT field, when stored, will always take the
> exact amount of space allocated for it in the schema definition. 

What makes you think the schema "allocates" space for strings?

  http://www.sqlite.org/datatype3.html

> So,
> when I say TEXT(1024), is the field guaranteed to take 1024 bytes on
> disk per record or is there a non-trivial storage scheme at work
> similar to VARCHAR types, which tries to optimize space usage.

The numbers have no effect.  "CHAR" and "TEXT" merely affect column affinity
as described in the previous link.

Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkvKH6gACgkQmOOfHg372QTWswCggv3U/PY8t43HY48i2Kc+/y7V
tW8Anjf0XTXCmpBhwZGNe2IBFksc71YT
=V4tj
-----END PGP SIGNATURE-----
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to