Re: [GENERAL] Partitioned Database and Choosing Subtables

2011-03-16 Thread Bill Thoen
On 3/16/2011 12:40 AM, Alban Hertroys wrote: Try using "dynamic" sql: EXECUTE 'SELECT lions, tigers, bears, statecode FROM WildLife WHERE state_pt = ' || statecode INTO ...; Thanks Igor. It was a nice try -- and I thought it would work, but the Planner had other plans. Basically, I tried the

Re: [GENERAL] Partitioned Database and Choosing Subtables

2011-03-16 Thread Alban Hertroys
>> Try using "dynamic" sql: >> >> EXECUTE 'SELECT lions, tigers, bears, statecode FROM WildLife WHERE >> state_pt = ' || statecode INTO ...; > Thanks Igor. It was a nice try -- and I thought it would work, but the > Planner had other plans. Basically, I tried the interactive method using a > P

Re: [GENERAL] Partitioned Database and Choosing Subtables

2011-03-15 Thread Bill Thoen
On 3/15/2011 12:02 PM, Igor Neyman wrote: -Original Message- From: Bill Thoen [mailto:bth...@gisnet.com] Sent: Monday, March 14, 2011 11:31 PM To: pgsql-general@postgresql.org Subject: Partitioned Database and Choosing Subtables I've got a ver 8.4.5 partitioned data base with records

Re: [GENERAL] Partitioned Database and Choosing Subtables

2011-03-15 Thread Igor Neyman
> -Original Message- > From: Bill Thoen [mailto:bth...@gisnet.com] > Sent: Monday, March 14, 2011 11:31 PM > To: pgsql-general@postgresql.org > Subject: Partitioned Database and Choosing Subtables > > I've got a ver 8.4.5 partitioned data base with records > organized by US state, so

Re: [GENERAL] Partitioned Database and Choosing Subtables

2011-03-14 Thread Christophe Pettus
On Mar 14, 2011, at 8:30 PM, Bill Thoen wrote: > I've got a ver 8.4.5 partitioned data base with records organized by US > state, so the partitions are set up by state. When I query this database and > include the key field that tells postgres what partition you , everything > works as I expe

[GENERAL] Partitioned Database and Choosing Subtables

2011-03-14 Thread Bill Thoen
I've got a ver 8.4.5 partitioned data base with records organized by US state, so the partitions are set up by state. When I query this database and include the key field that tells postgres what partition you , everything works as I expect. It searches only the specified partition, and it's f