Re: Directing Partitioned Table Searches - Mailing list pgsql-general

From Vick Khera
Subject Re: Directing Partitioned Table Searches
Date
Msg-id AANLkTikG3eZVYq8m7MVhYhwPJmGDMWRj8dWuYCZynWej@mail.gmail.com
Whole thread Raw
In response to Re: Directing Partitioned Table Searches  (Bill Thoen <bthoen@gisnet.com>)
List pgsql-general
On Mon, Feb 7, 2011 at 1:17 PM, Bill Thoen <bthoen@gisnet.com> wrote:
> Thanks. That sounds simple enough. Since I want to automate this, I guess
> the next step is to learn how to create and  execute a "dynamic" query.  I
> think I know how to do that.
>

In perl, it looks something like this:

$part = compute_partition($value);
$sth = $dbh->prepare("select * from table_$part where foo=?");
$sth->execute($value);

you just interpolate the parts you need in the query string.

pgsql-general by date:

Previous
From: Sylvain Rabot
Date:
Subject: Maintenance commands on standby servers
Next
From: Edoardo Panfili
Date:
Subject: Re: postgis 1.5.2 installation configure: WARNING: could not locate CUnit required for liblwgeom unit tests