[OGo-Developer] OGo, PostgreSQL 8.3, & INT casting

Adam Tauno Williams developer@opengroupware.org
Sat, 16 Feb 2008 16:29:50 -0500


> > Personally I think just storing INTs is better [and faster],  but  
> > maybe the
> > object_acl has some [edge / undocumented] functionality I'm not aware
> > of?
> I think the original idea was that it could be used for other stuff as  
> well (eg LDAP principal URLs instead of pkeys, etc). Anyways, I  
> already have those in my OGo 5.4 upgrade script:
> ALTER TABLE object_acl ALTER COLUMN object_id TYPE INT USING  
> object_id::int;
> ALTER TABLE object_acl ALTER COLUMN auth_id   TYPE INT USING  
> auth_id::int;
> Should fix it? (does the ALTER work that way with PG 8.3?)

Yep, that should work,  and more succinct than my fix.

> > However, the OGoModel represents these data-types as VARCHAR(255), so
> > maybe my fix isn't appropriate.
> I suspect that ACL is done directly at SQL level and doesn't use the  
> model. But I'm not 100% sure.