Re: [Pgsql-ayuda] funciones...nuevamente

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: GUSTAVO MARTIN OCAMPO <gocampo79(at)hotmail(dot)com>
Cc: pgsql-ayuda(at)tlali(dot)iztacala(dot)unam(dot)mx
Subject: Re: [Pgsql-ayuda] funciones...nuevamente
Date: 2003-11-12 04:48:26
Message-ID: 20031112044826.GB22028@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

On Wed, Nov 12, 2003 at 01:46:16AM +0000, GUSTAVO MARTIN OCAMPO wrote:

> create or replace function extrae_year() returns trigger as '
> declare
> var_row RECORD;
> var_year year%ROWTYPE;
> begin
> for var_row in select distinct extract (year from
> new.fecha_vencimiento) as fecha loop
>
> EXECUTE ''INSERT INTO ''
> || quote_ident(var_year.year) || '' ''
> || quote_literal(var_row.fecha);
> end loop;
> return null;
> end;'

Huh ... no entendí absolutamente nada. ¿Qué quieres lograr?

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Sallah, I said NO camels! That's FIVE camels; can't you count?"
(Indiana Jones)

In response to

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Gunnar Wolf 2003-11-12 05:24:33 Re: [Pgsql-ayuda] ejemplos de Pl/PgSql
Previous Message Alvaro Herrera 2003-11-12 04:39:36 Re: [Pgsql-ayuda] ejemplos de Pl/PgSql