Nuxeo mailing list archives
[CPS-users] Re: SQL Directory = Members directory?
Olivier Grisel
ogrisel at nuxeo.com
Thu Aug 31 20:03:01 CEST 2006
Joshua Kramer a écrit :
> Olivier,
>
> Thanks. Actually, a VARCHAR specifies how data is stored in the
> database. A VARCHAR only takes as much storage on disk as the actual
> data, where a CHAR always takes the field length even if the data is
> shorter than the field lenth. So, one record in this table:
>
> create table test (
> value1 varchar(128),
> value2 char(128)
> )
>
> where value1 = 'a' and value2 = 'b' will be 129 bytes, where
> value1='aaa' and value2=b' will be 132 bytes. In short, you still need
> to specify a field length for all fields. How can I tell, in a
> CPSSchema, how long the fields are?
You cannot by default. What you can do is add size control on the widget that
the user will use to feed the fields of you entries.
You could also you write_expr to truncate text that is longuer than some limit
for instance. But I do not understand why you do not want to just use varchar()
instead of varchar(n).
--
Olivier
More information about the cps-users
mailing list
This list archive provided by Nuxeo, the
leaders of open source ECM.
Check out the Nuxeo 5 open source,
standards-based ECM project.