| From: | Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com> |
|---|---|
| To: | Kenneth Dombrowski <kdombrowski(at)gmail(dot)com> |
| Cc: | pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: plpgsql function not accepting NULL value |
| Date: | 2005-09-16 23:17:21 |
| Message-ID: | 20050916161605.T93143@megazone.bigpanda.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
On Fri, 16 Sep 2005, Kenneth Dombrowski wrote:
> I can't get this one to work at all:
>
> create or replace function update_rate (integer, integer, integer,
> integer, numeric, integer)
> returns void
> as '
> declare
> x_admin_id alias for $1;
> x_developer_id alias for $2;
> x_client_id alias for $3;
> x_project_id alias for $4;
> x_rate alias for $5;
> x_rate_id alias for $6;
> x_meta_id alias for $7;
> begin
> perform update_lastmod (x_meta_id, x_admin_id);
> update rates_tbl set
> developer_id = x_developer_id ,
> client_id = x_client_id ,
> project_id = x_project_id ,
> rate = x_rate
> where rate_id = x_rate_id ;
> return ;
> end;
> ' language plpgsql;
>
>
> invoicer=> select update_rate(1, 1, 10, NULL, numeric '90.00', 6, 216);
> ERROR: function update_rate(integer, integer, integer, "unknown",
> numeric, integer, integer) does not exist
> HINT: No function matches the given name and argument types. You may
> need to add explicit type casts.
Umm, it looks to me like you're trying to pass 7 parameters to a function
that takes 6 in the above.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Fuhr | 2005-09-16 23:18:35 | Re: plpgsql function not accepting NULL value |
| Previous Message | Kenneth Dombrowski | 2005-09-16 23:04:39 | plpgsql function not accepting NULL value |