[GENERAL] Tricky SELECT question involving subqueries

2005-09-10 Thread Ben Hallert
ueries each path, then does another query below of "SELECT COUNT(*) FROM changehistory WHERE UPPER(filespec) LIKE UPPER('$pathspec%')". Each count query works fine, but the performance is crippling. Any ideas on how to make Postgres do the heavy lifting

Re: [GENERAL] Generate a list of (days/hours) between two dates

2005-06-28 Thread Ben Hallert
Thanks for the replies! I've adopted the generate_series method, it's absolutely perfect. I didn't have the dates in a table yet, I needed a method to generate them from scratch, and this will do nicely. Thanks again, and hopefully I'll be able to contribute back someday! -

[GENERAL] Generate a list of (days/hours) between two dates

2005-06-27 Thread ben . hallert
Hi guys, I've scoured the date/time functions in the docs as well as google-grouped as many different combinations as I could think of to figure this out without asking, but I'm having no luck. I'd like to make a query that would return a list of every trunc'd TIMESTAMPs between two dates. For e