AW: Re: AW: case insensitive database ?
От | Thorsten Mauch |
---|---|
Тема | AW: Re: AW: case insensitive database ? |
Дата | |
Msg-id | E5A63F34D141D111A6F4080009D70ACA0A38A0@imkedv_pdc обсуждение исходный текст |
Список | pgsql-novice |
Thanks No i can't use views dirctly, because in the framwork ervery class maps to one table. But i found that i can call stored precedures. Maybe i can call the view in a stored procedure ? does postgres allow this ? here is a small sniplet of the castor doc: The is also a special form of query that gives a possibility to call stored procedures: oql = db.getOQLQuery( "CALL sp_something($) AS myapp.Product" ); Here sp_something is a stored procedure returning one or more ResultSets with the same sequence of fields as Castor-generated SELECT for the OQL query "SELECT p FROM myapp.Product p" (for objects without relations the sequence is: identity, then all other fields in the same order as in mapping.xml). -----Ursprüngliche Nachricht----- Von: Joel Burton [mailto:jburton@scw.org] Gesendet: Mittwoch, 25. April 2001 01:03 An: Thorsten Mauch Cc: 'pgsql-novice@postgresql.org' Betreff: [NOVICE] Re: AW: case insensitive database ? On Wed, 25 Apr 2001, Thorsten Mauch wrote: > Thanks for the answers. > My prob is that i don't query the database > directly. I use the CASTOR as a persitence-Framework. > I create QOL-queries that are translated into > SQL-Queries by the framework. > So i can't use ILIKE or UPPER(expr) :( > I also can't force the use of a special index. > Howerver, i have to maintain a second field with upper > letters, that i query instead of the orginal field could you create a view and query that? CREATE TABLE pers (fname); INSERT INTO pers VALUES ('Joel'); CREATE VIEW pers_use_me AS SELECT fname, lower(fname) as lower_fname FROM pers; SELECT * FROM pers WHERE lower_fname = 'joel'; HTH, -- Joel Burton <jburton@scw.org> Director of Information Systems, Support Center of Washington ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@postgresql.org so that your message can get through to the mailing list cleanly
В списке pgsql-novice по дате отправления: