[TYPO3-dam] "LIKE BINARY" in SQL-Queries forces errors on PostgreSQL

Michiel Roos michiel at netcreators.com
Mon Dec 24 12:31:34 CET 2007


Christian Trabold wrote:
> Hi,
> 
> before I post this issue to the bugtracker, I'd like to discuss it with 
> you:
> 
> 
> In some places DAM uses "LIKE BINARY" for binary safe comparisons of the 
> filepaths. Examples:
> 
> /components/class.tx_dam_selectionFolder.php
> 
> $query.= ' LIKE BINARY 
> '.$GLOBALS['TYPO3_DB']->fullQuoteStr($likeStr.'%', 'tx_dam');
> 
> 
> /class.tx_dam_db.php
> 
> $where['file_path'] = 'tx_dam.file_path LIKE BINARY 
> '.$GLOBALS['TYPO3_DB']->fullQuoteStr($likeStr.'%', 'tx_dam');
> 
> 
> 
> This throws errors in the backend if TYPO3 runs with 
> PostgreSQL-Databases (through DBAL). After removing the "BINARY" 
> operator the errors disappeared.
> 
> 
> I wonder, if the "BINARY" operator is really mandatory to run DAM. What 
> do you think?
> 
> 
> I'd also really appreciate it, if someone could elaborate, why the 
> BINARY-Operator was implemented. Maybe we can find a DBAL-compliant 
> solution.

Hi Christian,

A DBAL compliant dam is a must. We are all with you on that one. 
Unfortunately very few of us here (if not none) have knowledge of why 
certain code was put in at point X in time. We're a group of people that 
stood up to start fixing all the standing dam bugs.

So if you can help shed any light on the matter, that would be great!

I'll fire up a postgress install today and have a look.

Kind regards,


Michiel Roos

-- 
Netcreators BV :: creation and innovation
www.netcreators.com

Interesse in werken bij Netcreators?
http://www.netcreators.com/bedrijf/vacatures/


More information about the TYPO3-project-dam mailing list