From: Ian B. <ia...@co...> - 2003-11-18 16:26:17
|
On Nov 18, 2003, at 5:06 AM, Frank Barknecht wrote: > Hallo, > > I may need case insensitive search in PostgreSQL. "ILIKE" is the case > insensitive "LIKE" in Postgres. Is it somehow possible to inherit and > extend SQLBuilder to present an ILIKE() method (and maybe matching > starts/endswiths)? If you look at SQLBuilder.LIKE, it should be pretty clear how to write an ILIKE function. > Slightly related but also quite off-topic: Importing a CSV-file into a > Postgres-table managed by SQLObject gives "pkey index exists" errors > on the id-column (because the csv contains ids that are already > present and actually should to be updated). The only solution I found > for this is to empty the table with "delete from X" before doing the > "copy from STDIN" import. Does anyone know a nicer way to do this? I think MySQL has something like REPLACE (DELETE or INSERT depending on existence of a key). There's other DB-specific ways to do the same thing, maybe something like that exists for Postgres. -- Ian Bicking | ia...@co... | http://blog.ianbicking.org |