Re: Intentando hacer un insert con un trigger.

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Pablo Braulio <brulics(at)gmail(dot)com>
Cc: postgres <pgsql-es-ayuda(at)postgresql(dot)org>
Subject: Re: Intentando hacer un insert con un trigger.
Date: 2008-01-17 16:46:00
Message-ID: 20080117164600.GI17828@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

Pablo Braulio escribió:

> Alvaro Herrera escribió:

> > Borra la palabra "EXECUTE" y deberia funcionar.
> >
> He visto el siguiente ejemplo en el manual y por eso lo había puesto.

No observaste que hay comillas en el parametro a EXECUTE?

> FOR mviews IN SELECT * FROM cs_materialized_views ORDER BY sort_key LOOP
> -- Ahora "mviews" tiene un registro de la vista cs_materialized_views
> PERFORM cs_log(’’Refreshing materialized view ’’ ||
> quote_ident(mviews.mv_name) || ’’...’’);
> EXECUTE ’’TRUNCATE TABLE ’’ || quote_ident(mviews.mv_name);
> EXECUTE ’’INSERT INTO ’’ || quote_ident(mviews.mv_name) || ’’ ’’ ||
> mviews.mv_query;

Sería bueno que además de mirar los ejemplos del manual, leyeras el
texto.

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Fabiola Fernández 2008-01-17 16:59:02 Cuestiones sobre un estudio entre PostgreSQL y ORACLE
Previous Message Pablo Braulio 2008-01-17 16:33:42 Re: Intentando hacer un insert con un trigger.