Re: about partitioning

From: David Fetter <david(at)fetter(dot)org>
To: Joao Ferreira gmail <joao(dot)miguel(dot)c(dot)ferreira(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: about partitioning
Date: 2008-09-16 00:30:38
Message-ID: 20080916003038.GC3666@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Sep 15, 2008 at 11:48:49PM +0100, Joao Ferreira gmail wrote:
> Hi Robert and all,
>
>
> I've been trying to follow the examples on the pg docs, section 5.9,
> with your presentation as aditional guide.
>
> I've bumped into the UPDATES. I'm getting this:
>
> ----------------------------------------------------------
> CREATE RULE measurement_update_y2004m02 AS ON UPDATE TO measurement
> WHERE ( logdate >= DATE '2004-02-01' AND logdate < DATE '2004-03-01' )
> DO INSTEAD UPDATE INTO measurement_y2004m02 VALUES (NEW.city_id,
> NEW.logdate, NEW.peaktemp, NEW.unitsales);
> ERROR: syntax error at or near "INTO"
> LINE 1: ...D logdate < DATE '2004-03-01' ) DO INSTEAD UPDATE INTO
> measu...
> -------------------------------------------------
>
> it doesn't like the INTO part.
>
> can you help me?
>
> thanks
> joao

João,

Rules are not how you want to do this anyhow. Write triggers :)

Cheers,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Fetter 2008-09-16 00:50:25 Re: Obfuscated stored procedures (was Re: Oracle and Postgresql)
Previous Message Bill Moran 2008-09-16 00:29:22 Obfuscated stored procedures (was Re: Oracle and Postgresql)