What does this error message mean?

From: Ken Tanzer <ken(dot)tanzer(at)gmail(dot)com>
To: PG-General Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: What does this error message mean?
Date: 2013-11-18 00:40:23
Message-ID: CAD3a31W=J66vzAYB5JFweOd4pkP0SUK=wVn0HVtGaLu=BYcBUA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi. I got an error message reported to me that I've never seen before, and
I'm not quite sure what it means or what would cause it. When I re-run the
query now, it runs without complaint, so the problem seems to have gone
away. Which of course I don't understand either! Would be nice to know
for the future. This is on 9.2.5.

The message says the error is at line 195 of a function. I've attached the
function source in case it's relevant/helpful.

(And BTW, how exactly is that line number counted? Does the "CREATE
FUNCTION" statement count as line 1? Or does it start with the opening
quote? And it looks like whitespace and comments are preserved internally,
so is it safe to assume the line number should match with a source file
used to create the function? My best guess is that line 195 in this case
is "pay_test.is_deleted=false;" but that doesn't help me understand this
error any better!

CREATE FUNCTION blah blah $$
DECLARE... Line 1?

CREATE FUNCTION blah blah
$$

DECLARE... Line 1? 2?

CREATE FUNCTION blah blah
$$DECLARE... Line 1?

Here's the query:

INSERT INTO tbl_payment SELECT * FROM generate_payments
('12/1/2013','ASSIST_PRI','3852',sys_user()) WHERE NOT
ROW(client_id,payment_type_code,payment_date) IN (SELECT
client_id,payment_type_code,payment_date FROM payment_valid);

The error message was:

ERROR: type of parameter 70 (text) does not match that when preparing the
plan (unknown) CONTEXT: PL/pgSQL function
generate_payments(date,text,integer,integer) line 195 at assignment

Thanks in advance for shedding any light on this.

Ken

--
AGENCY Software
A data system that puts you in control
100% Free Software
*http://agency-software.org/ <http://agency-software.org/>*
ken(dot)tanzer(at)agency-software(dot)org
(253) 245-3801

Subscribe to the mailing
list<agency-general-request(at)lists(dot)sourceforge(dot)net?body=subscribe>
to
learn more about AGENCY or
follow the discussion.

Attachment Content-Type Size
create.functions_rent_calculations.sql text/x-sql 12.5 KB

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Edson Richter 2013-11-18 00:46:23 Re: Postgres as In-Memory Database?
Previous Message Gavin Flower 2013-11-18 00:02:32 Re: Postgres as In-Memory Database?