Re: Trigger problem

Поиск
Список
Период
Сортировка
От Alejandro D. Burne
Тема Re: Trigger problem
Дата
Msg-id 8398dc6d05072204282ca02601@mail.gmail.com
обсуждение исходный текст
Ответ на Trigger problem  ("Alejandro D. Burne" <alejandro.dburne@gmail.com>)
Список pgsql-general
Well, after hours to debug this issue, I found the problem.
There is a misspelled word, thanks and sorry for waste your time.

Alejandro

2005/7/21, Alejandro D. Burne <alejandro.dburne@gmail.com>:
> Thanks Michael for your reply, I've attached the db structure and some
> data to add, this is the command that fire the trigger.
>
> insert into socios (codigoprofesion, matriculaprofesional, codigoctm,
> nombreprofesional, codigotipodocumento,
> numerodocumento, calleparticular, numeroparticular, pisoparticular,
> dtoparticular, otrosparticular,
> codigolocalidadparticular, telefonoparticular, calleconsultorio,
> numeroconsultorio, pisoconsultorio,
> dtoconsultorio, otrosconsultorio, codigolocalidadconsultorio,
> telefonoconsultorio, codigocobrador,
> codigolocalidadcobranza, codigozona, sexo, codigomotivobajaservsoc,
> fechaingresoctm, codigomotivobajactm,
> codigonacionalidad, fechaegreso, codigocondicioniva, cuit,
> codigoganancia, ingresosbrutos,
> nrocajajubilacion, nroartedecurar, codigouniversidad,
> codigoespecialidad, codigoespecialidad2,
> codigoformacobro, codigobanco, codigosucursal, numerocuentabanco,
> codigotiposociedad, numerotarjeta,
> codigogastoadministrativo, email, numeroregistrosss,
> nombreprofesionalcheque) VALUES
> (1, 1, 1, 'TEST', 1, 123456, '', '', '', '', '', 20000, '', '', '',
> '', '', '', 20000, '', 1,
> 20000, 1, 'M', 0, CURRENT_DATE, 0, 1, CURRENT_DATE, 1, '', 1, '', 0,
> 0, 1, 0, 0, 1, 0, 0, '', 0, 0,
> 1, '', 0, '');
>
> Error message (in spanish, sorry):
> ERROR:  error de sintaxis en o cerca de «INTO» at character 9
> QUERY:  SELECT  INTO  NroRegistros COUNT(CodigoDomicilioMultiple) FROM
> DomiciliosMultiples WHERE CodigoProfesion= $1  AND
> MatriculaProfesional= $2
> CONTEXT:  PL/pgSQL function "socio_update" line 21 at SQL statement
>
> I don't know why fires socio_update trigger (seems to be the problem),
> I just insert a record on socios, there is no update command on socios
> on socio_insert trigger.
>
> Thanks again Alejandro
>
>
>
> 2005/7/20, Michael Fuhr <mike@fuhr.org>:
> > On Wed, Jul 20, 2005 at 03:00:42PM -0300, Alejandro D. Burne wrote:
> > > Hi, I'll be trying to write a my first trigger which fire when an user
> > > makes an insert into a table; this insert records in others tables.
> > > But when I try to insert a record in trigger's table generate an error:
> > >  - Syntax error near "into" in char 9. -
> >
> > The INSERT statement itself might be at fault instead of the trigger
> > function.  Please post the INSERT statement and the complete, exact
> > error message (there are probably multiple lines).  If that doesn't
> > tell us what's wrong, then we'll need to see a self-contained
> > example, i.e., all SQL statements that somebody could execute in
> > an empty database to reproduce the problem.
> >
> > --
> > Michael Fuhr
> > http://www.fuhr.org/~mfuhr/
> >
>
>
>

В списке pgsql-general по дате отправления:

Предыдущее
От: Roman Neuhauser
Дата:
Сообщение: Re: problem casting varchar to inet
Следующее
От: Leonel Nunez
Дата:
Сообщение: Re: Copying bytea data out via pgsql