Thanks guys...! I am going to give this a try! I should of course just have tried this out. Will give it a go.
I am not going to be anywhere near 10k rows, but probably rather a few hundred rows. So table scan won't be that big a deal, and this is never going to be a performance critical system, but rather one used in test environments. Thanks again! /JP On Nov 4, 6:41 pm, Jim <[email protected]> wrote: > > able to insert aregularexpression, that I will then use to match > > against the path. That way having a record value like /\/users\/(\d*)/ > > to match a client request path like /users/1234. > > > | path | response | > > ------------------------------ > > | /\/users\/(\d*)/ | { users } | > > > I first looked > > athttp://www.postgresql.org/docs/8.3/static/functions-matching.html > > (section 9.7.2), but that is the reverse problem > > I'm not sure what problem you're trying to solve with an approach like > this, but a quick test confirms that a query such as: > > select response > from paths > where '/users/1234' similar to path > > would actually work. Of course, it will require setting up a custom > sql condition, but that's not really a huge deal. As for the previous > reply, a sequential table scan on 10k records isn't a big deal for > PostgreSQL on any modern machine, in fact I rarely even think about > indices until tables are at least approaching 10k records and usually > well beyond. > > Jim Crate -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: 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/rubyonrails-talk?hl=en.

