I'd imagine you could just off-load your needs to your application and
parse the DDL itself.  Use PRAGMA table_info() and parse out the column
lengths from there...assuming you're consistently adding this info...

On Wed, Apr 25, 2012 at 12:36 PM, 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.
>
> On Wed, Apr 25, 2012 at 9:00 AM, <sqlite-users-requ...@sqlite.org> wrote:
>
> > Message: 23
> > Date: Tue, 24 Apr 2012 13:43:25 -0700
> > From: Roger Binns <rog...@rogerbinns.com>
> > To: General Discussion of SQLite Database <sqlite-users@sqlite.org>
> > Subject: Re: [sqlite] sqlite3 column widths
> > Message-ID: <4f97106d.7080...@rogerbinns.com>
> > Content-Type: text/plain; charset=ISO-8859-1
> >
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > On 24/04/12 13:26, Pete wrote:
> > > Is there way to have sqlite3 display the columns in the result of a
> > > SELECT statement using their defined widths in the schema?  For example
> > > if a column is defined as "Name(40) TEXT", I want the column to be 40
> > > chars wide.
> >
> > Those numbers you put in the schema are ignored by SQLite and do not
> limit
> > or provide any hints to any SQLite code.  How SQLite deals with types is
> > detailed here:
> >
> >  http://www.sqlite.org/datatype3.html
> >
> > Separately from that the SQLite source code is public domain and you have
> > the full rights to modify it, redistribute it etc.  You can modify the
> > code to work however you want.
> >
> > Roger
> >
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.4.11 (GNU/Linux)
> >
> > iEYEARECAAYFAk+XEG0ACgkQmOOfHg372QRCpgCdEVfimkFYA8kx3WQixtfEVEAs
> > DpEAoLY1FVYSbQVNZoRM0dTa1fmUbsKj
> > =uuvW
> > -----END PGP SIGNATURE-----
> >
>
>
>
> --
> Pete
> Molly's Revenge <http://www.mollysrevenge.com>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
Regards.

Brian P Curley
  home: 845 778-5937
  cell: 845 548-4377
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to