470,647 Members | 1,155 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,647 developers. It's quick & easy.

indexes on columns and functions

You can CREATE INDEX on multiple columns, and you can CREATE INDEX on a functions, but can
you create an index on multiple columns and functions? For example if I want to create an
index on lower(textfield), intfield
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 11 '05 #1
1 1432
On Wed, 2 Jul 2003, Joseph Shraibman wrote:
You can CREATE INDEX on multiple columns, and you can CREATE INDEX on
a functions, but can you create an index on multiple columns and
functions? For example if I want to create an index on
lower(textfield), intfield


In 7.3 or earlier you'd have to write a mangling function that took
multiple columns did functions you wanted and appended the fields together
in some fashion I believe. In 7.4 you can make a index like the above
with something like
create index foo on tab((lower(textfield)), intfield)

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 11 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Steve_CA | last post: by
9 posts views Thread by Igor | last post: by
3 posts views Thread by serge | last post: by
3 posts views Thread by Randell D. | last post: by
2 posts views Thread by Jeff MacDonald | last post: by
4 posts views Thread by bwmiller16 | last post: by
2 posts views Thread by rAinDeEr | last post: by
reply views Thread by warner | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.