Re: problem with triggers - Mailing list pgsql-general

From Tom Lane
Subject Re: problem with triggers
Date
Msg-id 11328.996597638@sss.pgh.pa.us
Whole thread Raw
In response to problem with triggers  (miguel angel rojas aquino <mrojas_aquino@mail.flashmail.com>)
List pgsql-general
miguel angel rojas aquino <mrojas_aquino@mail.flashmail.com> writes:
>  DECLARE
>   registro RECORD;
>  BEGIN

>  IF NEW.inscripcion = 0 THEN
>   SELECT * INTO registro
>   FROM precios
>   WHERE NEW.curso = registro.curso AND
>         NEW.sistema = registro.sistema AND
>         NEW.turno = registro.turno AND
>         NEW.semestre = registro.semestre;

> but every time i insert a new record, it says something like:
> "ERROR record registro not assigned yet"

I'm betting that you meant to refer to precios, not registro,
in the WHERE clause.

            regards, tom lane

pgsql-general by date:

Previous
From: Fran Fabrizio
Date:
Subject: looking for a secure
Next
From: Fran Fabrizio
Date:
Subject: Re: looking for a secure