Thanks Guillaume, that works perfectly on postgresql, where did you find that syntax? it does not seem to be documented anywhere
On Aug 27, 12:40 am, Guillaume Laville <[email protected]> wrote: > 2010/8/27 Jim Morris <[email protected]> > > > Is there a way within the sequel syntax to create an index that is > > case insensitive? > > > I postgresql I do this in my raw DDL... > > > create unique index idx_user_tbl_contact_email on user_tbl > > ( lower(contact_email) ); > > Perhaps : > DB.add_index :user_tbl, :lower.sql_function(:contact_email), :unique => true > > Which produces the resulting SQL : > #=> CREATE UNIQUE INDEX `user_tbl_lower__contact_email___index` ON > `user_tbl` (lower(`contact_email`)) > > I don't have postgrees installed here to test, > but it should worlk fine if your database support this SQL syntax. > > Guillaume -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sequel-talk?hl=en.
