RE: trouble with trigger/function???

From: "chris markiewicz" <cmarkiew(at)commnav(dot)com>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "'Nelson Ferreira Jr'" <nelson(at)radix(dot)com(dot)br>, "'Postgres \(E-mail\)'" <pgsql-general(at)postgresql(dot)org>
Subject: RE: trouble with trigger/function???
Date: 2000-10-03 16:59:15
Message-ID: 003d01c02d5b$43cdd290$dbb846c6@cmarkiewicz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(at)sss(dot)pgh(dot)pa(dot)us]
Sent: Tuesday, October 03, 2000 11:38 AM
To: cmarkiew(at)commnav(dot)com
Cc: 'Nelson Ferreira Jr'; 'Postgres (E-mail)'
Subject: Re: [GENERAL] trouble with trigger/function???

"chris markiewicz" <cmarkiew(at)commnav(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Hoffmann 2000-10-03 17:05:53 Re: alternative DB locations
Previous Message Micah Anderson 2000-10-03 16:55:45 Memory bloating