Re: [GENERAL] Leaky Perl / DBIx / Postgres 9.0.1 Trio

2012-04-04 Thread Tom Molesworth
Hi, On 04/04/12 19:21, Eliot Gable wrote: I have a Perl daemon handling some events on a system which inserts or updates rows in Postgres, and something is causing memory usage to grow. I see the RSS memory size allocated to the Postgres connection continual going up (slowly) and the RSS size

Re: [GENERAL] Managing two sets of data in one database

2012-03-29 Thread Tom Molesworth
Hi Jonathan, On 29/03/12 19:01, Jonathan Bartlett wrote: Now, my issue is that right now when we do updates to the dataset, we have to make them to the live database. I would prefer to manage data releases the way we manage software releases - have a staging are

Re: [GENERAL] user get notification when postgresql database updated

2012-03-28 Thread Tom Molesworth
On 28/03/12 12:40, Albert wrote: I am using javaScript app and PostgreSQL database. I have car_alert as a table contains id (FK of cars table) and userid (FK of users table) each car has a status ( status column in cars table ). car_alert is updating and having new records (car id and userid ) e

Re: [GENERAL] can these queries be combined into one?

2012-03-26 Thread Tom Molesworth
Hi, On 25/03/12 08:16, haman...@t-online.de wrote: I am currently doing something like select ordercode, descr, codes into temp table x from products where ... Here codes is a bit-mapped field update x set codes = codes | 512 from othertable t where ordercode = t.ordercode and select * fr

Re: [GENERAL] atoi-like function: is there a better way to do this?

2012-03-05 Thread Tom Molesworth
On 05/03/12 05:08, Chris Angelico wrote: On Mon, Mar 5, 2012 at 3:15 PM, Tom Molesworth wrote: Can you use to_number() here? It sounds like something along the lines of cast(to_number('0' || field::varchar, '9.') as int) might give the behaviour you're after,

Re: [GENERAL] atoi-like function: is there a better way to do this?

2012-03-04 Thread Tom Molesworth
On 05/03/12 04:06, Chris Angelico wrote: On Mon, Mar 5, 2012 at 2:50 PM, David Johnston wrote: Any efficient, non-RegEx, alternative would require more context to evaluate than you provide. Mainly, would it be faster to have a separate field to store the parsed (at input) number and then que

Re: [GENERAL] Whats the most efficient query for this result?

2012-01-17 Thread Tom Molesworth
On 17/01/12 17:51, Nick wrote: On Jan 17, 3:33 am, t...@audioboundary.com (Tom Molesworth) wrote: Hi Nick, On 17/01/12 00:18, Nick wrote: What is the most efficient way to get this result... query_result (user_id, book_count, book_price_total, pencil_count, pencil_price_total) 1 | 2 | $20

Re: [GENERAL] Whats the most efficient query for this result?

2012-01-17 Thread Tom Molesworth
Hi Nick, On 17/01/12 00:18, Nick wrote: I have three tables (users, books, pencils) and would like to get a list of all users with a count and total price of their books and pencils for 2012-01-01... So with this data... users (user_id) 1 2 3 books (user_id, price, created) 1 | $10 | 2012-01-