[postmodern-devel] creating a function based index
2 Jan
2010
2 Jan
'10
7:14 p.m.
Hello, is there syntax available for creating function based indexes? How can I write this in s-sql? ,---- | CREATE INDEX my_index ON my_table (LOWER(my_column)) `---- I tried ,---- | (sql (:create-index :my-index :on :my-table :fields (:lower :my-column))) | | => (:LOWER :TERM) cannot be coerced to a string. | [Condition of type SIMPLE-TYPE-ERROR] `---- Thanks in advance, Richard
4 Jan
4 Jan
5:26 p.m.
Hi Richard, I wasn't aware one could create indices on the results of a function. I've pushed a hack to the darcs repository that makes your example possible: (sql (:create-index :my-index :on :my-table :fields (:lower :my-column))) => "CREATE INDEX my_index ON my_table (lower(my_column))" Best, Marijn
5511
Age (days ago)
5513
Last active (days ago)
1 comments
2 participants
participants (2)
-
Marijn Haverbeke
-
Richard KLINDA