Re: Create Rule

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Fernando San Martín Woerner <snmartin(at)galilea(dot)cl>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Create Rule
Date: 2001-11-15 22:54:26
Message-ID: 19671.1005864866@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

=?iso-8859-1?Q?Fernando_San_Mart=EDn_Woerner?= <snmartin(at)galilea(dot)cl> writes:
> i'm trying to do this
> CREATE RULE borra_presupuesto AS ON DELETE TO presupuesto DO INSTEAD
> (UPDATE presupuesto SET en_uso = 'False' WHERE cod_presupuesto =
> old.cod_presupuesto;
> UPDATE detalle_presupuesto SET en_uso = 'False' WHERE cod_presupuesto =
> old.cod_presupuesto);

> but i get this error:
> ERROR: parser: parse error at or near ""

Looks okay here: I get 'Relation "presupuesto" does not exist'
so it's getting past the parsing stage.

What PG version are you using? I have a vague recollection that
the syntax for multiple-action rules might have changed awhile back.

regards, tom lane

In response to

  • Create Rule at 2001-11-15 15:51:13 from Fernando San Martín Woerner

Browse pgsql-general by date

  From Date Subject
Next Message Gurupartap Davis 2001-11-15 22:57:04 Re: pgsql and large tables
Previous Message Tom Lane 2001-11-15 22:52:00 Re: Idle in transaction ????