Re: plpgsql function errors

From: "Juan Casero (FL FLC)" <Juan(dot)Casero(at)wholefoods(dot)com>
To: "Martijn van Oosterhout" <kleptog(at)svana(dot)org>
Cc: "Postgresql General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: plpgsql function errors
Date: 2005-02-04 19:14:44
Message-ID: 7583B3F1891CC0429FA4A44952AA539C0BD5A3@wfm-exchprd2.wfm.pvt
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Here is the output of that command. I ran it in a unix shell and
redirected the psql output to a file so I haven't touched it...

Result data type | Schema | Name |
Argument data types | Owner |
Language |
Source code
| Description
------------------+--------+--------+-----------------------------------
-------------------------------------------------------------+----------
+----------+------------------------------------------------------------
------------------------------------------------------------------------
------------------------------------------------------------------------
------------------------------------------------------------------------
------------------------------------------------------------------------
------------------------------------------------------------------------
------------------------------------------------------------------------
----------------------------------+-------------
integer | public | trx_id | character varying, smallint,
character, date, character, character, character, date, character |
postgres | plpgsql |

DECLARE

p_customer_id ALIAS FOR $1;
p_store ALIAS FOR $2;
p_trx_type ALIAS FOR $3;
p_trx_date ALIAS FOR $4;
p_reissue ALIAS FOR $5;
p_receipt ALIAS FOR $6;
p_purchloc ALIAS FOR $7;
p_purchdate ALIAS FOR $8;
p_associate ALIAS FOR $9;
p_trx_id transactions.trx_id%TYPE;

BEGIN

INSERT INTO transactions VALUES
(nextval('trx_id_seq'),'p_customer_id',p_store,'p_trx_type','p_trx_date'
,'p_reissue','p_receipt','p_purch_loc','p_purch_date','p_associate');
SELECT INTO p_trx_id currentval('trx_id_seq');
RETURN (p_trx_id);
END;
|
(1 row)

-----Original Message-----
From: Martijn van Oosterhout [mailto:kleptog(at)svana(dot)org]
Sent: Friday, February 04, 2005 1:56 PM
To: Juan Casero (FL FLC)
Cc: Postgresql General
Subject: Re: [GENERAL] plpgsql function errors

On Fri, Feb 04, 2005 at 12:44:35PM -0600, Juan Casero (FL FLC) wrote:
> Sorry about that. I did forget one parameter...
>
> customer_service=# select
>
trx_id('JUANCASERO3055128218',805,'CREDIT','02/02/05','1','1','Aventura'
> ,'02/01/05','Tom');
> ERROR: function trx_id("unknown", integer, "unknown", "unknown",
> "unknown", "unknown", "unknown", "unknown", "unknown") does not exist
> HINT: No function matches the given name and argument types. You may
> need to add explicit type casts.

Please post the output of: \df+ trx_id

That will tell you what parameters it expects.
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is
> a tool for doing 5% of the work and then sitting around waiting for
> someone else to do the other 95% so you can sue them.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Juan Casero (FL FLC) 2005-02-04 19:15:50 Re: plpgsql function errors
Previous Message David Fetter 2005-02-04 18:58:33 Re: Questions about functionality