On 25 Apr 2012 at 17:36, Pete <p...@mollysrevenge.com> wrote: 

> So I guess that's a "No" then?
>
> I'm fully aware of how sqlite3 treats datatypes and column width
> specifications, but surely if someone defines a column with a specific max
> width, it's reasonable to assume that's the max width they want, otherwise
> why bother defining it?  That would seem to be a lot less arbitrary than
> the current logic for determining the default column width.

If you're talking about the CLI program called "sqlite3", then as has been 
stated, it has no information pertaining to how wide you want the column to be. 
As I understand it, classical SQL (if that's the term) allowed you in your 
table definition to define and thereby limit a column width. Personally I see 
no merit in that and am glad that SQLite doesn't enforce it, just as PHP, for 
example, doesn't expect you to pre-define the length of a string. I suppose 
SQLite allows you to give a width but then ignores it, as is well documented.

Nothing to stop you adding some code to the sqlite3 CLI program to have extra 
commands, allowing you to define column widths for display purposes. E.g:

sqlite3> .colwidth xxxxx 27

where xxxxx is the name of a column in some table.

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

Reply via email to