6.0.0-beta1
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
8/17/25
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#8899] Inconsistent data type for group_uid
*
Your Email Address
*
Spam protection
Enter the letters below:
.__ __.. ..__..___. [__)(__ | |[__] _/ | \.__)|__|| |./__.
Comment
> Many Horde and associated projects have a group_uid column. In some > tables this is an INT (eg. horde_groups) in others a VARCHAR(255) > (eg. ansel_shares_groups). Some code (eg > horde/lib/Horde/Share/sql.php) ends up generating SQL fragments such > as "group_uid in ( 1, 2 )". In PostgreSQL, this causes an error when > group_uid has a datatype on VARCHAR(255). > > A simple patch in horde/lib/Horde/Share/sql.php (1.1.2.57 2009-08-12) > on line 691 from > $group_ids[] = $this->_db->quote($id); > to > $group_ids[] = $this->_db->quote((string)$id); > fixes this because PostgreSQL can cast automatically from string to > int, but not vice versa (don't know why since one might things its > the easier cast) > > However, I suspect this is not the best approach. > > Is there any reason why the column has different datatypes in > different tables? > > I have toyed with the ideas of creating a database update script > which forces all the group_uid columns to be INT, but without a lot > of code analyzing, I'm not sure whether this would work.
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers