Re: PL/PGSQL Function - Mailing list pgsql-general

From Tom Lane
Subject Re: PL/PGSQL Function
Date
Msg-id 19126.963955773@sss.pgh.pa.us
Whole thread Raw
In response to PL/PGSQL Function  (Michael Fork <mfork@toledolink.com>)
List pgsql-general
Michael Fork <mfork@toledolink.com> writes:
> radius=# INSERT INTO radacct (username, acctstatustype, acctsessiontime,
> acctinputoctets, acctoutputoctets) VALUES ('mfork', 'Stop', 3600, 1000,
> 1000);
> NOTICE:  plpgsql: ERROR during compile of ti_update near line 1
> "RROR:  parse error at or near "
> ++++++++++++++

> NOTE:  The quotation mark replacing the 'E' is how it is printed in the
> error message.

Wild guess here: is it possible that the file you keep the function
definition in contains newlines represented as CR/LF or even just CR,
instead of the Unix-standard LF?

I'm not sure whether the plpgsql parser is flexible about this or not.
If not, it probably should be --- but I can see how a parser complaint
about an unexpected CR might cause the sort of overprinting you
describe.

            regards, tom lane

pgsql-general by date:

Previous
From: Ferruccio Zamuner
Date:
Subject: PRIMARY KEY & INHERITANCE (fwd)
Next
From: Peter Eisentraut
Date:
Subject: Re: order by rand()