From: Jess Robinson Date: Mon, 22 Sep 2008 12:35:06 +0000 (+0000) Subject: FAQ patch from Alex, how to make oracle searches case insensitive X-Git-Tag: v0.08240~351 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f4db0d9033ae99351ca6cdd3de973a13fe08acaa;p=dbsrgits%2FDBIx-Class.git FAQ patch from Alex, how to make oracle searches case insensitive --- diff --git a/lib/DBIx/Class/Manual/FAQ.pod b/lib/DBIx/Class/Manual/FAQ.pod index c6960f0..a3fe023 100644 --- a/lib/DBIx/Class/Manual/FAQ.pod +++ b/lib/DBIx/Class/Manual/FAQ.pod @@ -265,6 +265,18 @@ its SQL searches. So if you fail to find help in the L, try looking in the SQL::Abstract documentation. +=item .. make searches in Oracle (10gR2 and newer) case-insensitive? + +To make Oracle behave like most RDBMS use on_connect_do to issue +alter session statements on database connection establishment: + + ->on_connect_do("ALTER SESSION SET NLS_COMP = 'LINGUISTIC'"); + ->on_connect_do("ALTER SESSION SET NLS_SORT = '_CI'"); + e.g. + ->on_connect_do("ALTER SESSION SET NLS_SORT = 'BINARY_CI'"); + ->on_connect_do("ALTER SESSION SET NLS_SORT = 'GERMAN_CI'"); + + =back =head2 Fetching data