pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone.bigpanda.com>
To: Kenneth Dombrowski <kdombrowski@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: plpgsql function not accepting NULL value
Date: Fri, 16 Sep 2005 16:17:21 -0700 (PDT)
Message-ID: <20050916161605.T93143@megazone.bigpanda.com> (raw)
In-Reply-To: <d7ba27305091616046e23e171@mail.gmail.com>
References: <d7ba27305091616046e23e171@mail.gmail.com>

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.



view thread (4+ messages)  latest in thread

Message-ID: <20050916161605.T93143@megazone.bigpanda.com>
Permalink:  ../20050916161605.T93143@megazone.bigpanda.com/
Also on:    postgresql.org/message-id/20050916161605.T93143@megazone.bigpanda.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: sszabo@megazone.bigpanda.com, kdombrowski@gmail.com
  Subject: Re: plpgsql function not accepting NULL value
  In-Reply-To: <20050916161605.T93143@megazone.bigpanda.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox