[typo] Keywords Size Limit

Matijs van Zuijlen matijs at matijs.net
Tue Apr 20 14:58:29 EDT 2010

Hello Toby,

On 04/20/2010 10:57 AM, Toby Bryans wrote:
> I'm running typo on a postgres database for a choir website
> (http://amicichamberchoir.org.uk/ if you're interested) and I try to put
> the name of the composers of each piece sung in each concert in the tags
> of the entry. This is fine, until I hit 254 characters which I have
> done, for example in the latest entry.

Well, that's an unexpected use of tags! :-)

> This causes a problem because in the contents table the kewords column
> is set to: character varying(255). Some questions:
> 1) Would it be possible to increase the size of this column so a larger
> string can be put in that column in a future release?


> 2) Will it cause problems for future upgrades if I change the size of
> this column now?

Probably not, but do make extra sure you make a backup of the database before 

> 3) There's got to be a better way of referencing tags to articles rather
> than parsing a long string. Are there plans to improve this in the
> future? I'm thinking in terms of having a table that consists of
> contents_id, tag_id tuples. Am I wrong in thinking that that would be
> better? I imagine it isn't an easy change though.

I just took a look, and in fact, both methods are used at the same time: the 
tags are stored in the keywords column, and then copied into a structure like 
the one you propose. I admit this is rather odd, although there is a 
sort-of-good technical reason why this is so: Other types of contents store 
their keywords _only_ in the keywords column.

Given that tags are already stored in a separate table, it shouldn't be too big 
of a change to lift the 255-character limit. I will file a bug in Typo's bug 
tracking system for this.

By the way, you can have tags with spaces in them by surrounding them with 
single or double quotes. That way, you don't need to use periods.


More information about the Typo-list mailing list