RE: trouble with trigger/function???

Поиск
Список
Период
Сортировка
От chris markiewicz
Тема RE: trouble with trigger/function???
Дата
Msg-id 003f01c02d5f$3b4fea50$dbb846c6@cmarkiewicz
обсуждение исходный текст
Ответ на trouble with trigger/function???  ("chris markiewicz" <cmarkiew@commnav.com>)
Список pgsql-general
please disregard my last question (below).  looks like all of my problems,
including the typeidTypeRelid exception, were related to shady characters
from dos.

thanks again for all of your help.
chris

-----Original Message-----
From: chris markiewicz [mailto:cmarkiew@commnav.com]
Sent: Tuesday, October 03, 2000 12:59 PM
To: 'Tom Lane'
Cc: 'Nelson Ferreira Jr'; 'Postgres (E-mail)'
Subject: RE: [GENERAL] trouble with trigger/function???


Ah, you are correct.

Okay, I think I'm close...when I run my function (or any function), I get
the following runtime error:

ERROR: typeidTypeRelid: Invalid type - oid = 0

The exact text of the fn is:

CREATE FUNCTION sp_person_resource() RETURNS OPAQUE AS '
BEGIN INSERT INTO resource(resourceid, name, type, description) values
(1906, ''chris'', ''person'', ''com.commnav....'');
RETURN NEW;
END;'
LANGUAGE 'plpgsql';

What does that error mean?  Note that I was getting the same error when I
was running a SELECT fn as well.

thanks
chris

-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Tuesday, October 03, 2000 11:38 AM
To: cmarkiew@commnav.com
Cc: 'Nelson Ferreira Jr'; 'Postgres (E-mail)'
Subject: Re: [GENERAL] trouble with trigger/function???


"chris markiewicz" <cmarkiew@commnav.com> writes:
> NOTICE: plpgsql: ERROR during compile of onefn near line 1
> "RROR: parse error at or near "

The message looks just like that, eh?  It's probably complaining about a
carriage return character in the text.  Don't prepare your scripts with
DOS-style newline sequences in them.  (For 7.1, plpgsql has been fixed
to accept \r as whitespace, but current versions don't...)

            regards, tom lane


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

Предыдущее
От: "Adam Lang"
Дата:
Сообщение: Updates
Следующее
От: "Ross J. Reedstrom"
Дата:
Сообщение: Re: Memory bloating