RE: trouble with trigger/function??? - Mailing list pgsql-general

From chris markiewicz
Subject RE: trouble with trigger/function???
Date
Msg-id 003d01c02d5b$43cdd290$dbb846c6@cmarkiewicz
Whole thread Raw
In response to Re: trouble with trigger/function???  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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@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 by date:

Previous
From: Micah Anderson
Date:
Subject: Memory bloating
Next
From: Jeff Hoffmann
Date:
Subject: Re: alternative DB locations