From: | Ken Corey <ken(at)kencorey(dot)com> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: Easy way to call a plpgsql function? |
Date: | 2001-02-06 08:06:41 |
Message-ID: | 0102060806410N.18716@kenlinux.bithub.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
*sigh* If you look a tad more closely than I did, you'll see there's a syntax
error in the first example. Once fixed, the function seems to operate as
expected.
One shouldn't try to program before morning coffee, I guess... *smile*
-Ken
On Tuesday 06 February 2001 7:56 am, Ken Corey wrote:
> Hi All,
>
> I'm trying to call a plpgsql function:
> func(varchar(255).varchar(255).varchar(255).varchar(255).varchar(255).varch
>ar(255).varchar(255).varchar(255).varchar(255).varchar(255).varchar(255));
>
> With:
> GRE=# select IU_EMPLOYEE ('f','f','f','f'',f','f','f','f','f','f','f');
> ERROR: Function 'iu_employee(unknown, unknown, unknown, unknown, unknown,
> unknown, unknown, unknown, unknown, unknown)' does not exist
> Unable to identify a function that satisfies the given argument
> types You may need to add explicit typecasts
> GRE=#
>
> I thought maybe overloading causes this...so I cast all the arguments as
> varchars, and sure enough...
>
> GRE=# select IU_EMPLOYEE (cast('f' as varchar),cast('f' as
> varchar),cast('f' as varchar),cast('f' as varchar),cast('f' as
> varchar),cast('f' as
> varchar),cast('f' as varchar),cast('f' as varchar),cast('f' as
> varchar),cast('f' as varchar),cast('f' as varchar));
> iu_employee
> -------------
> 1
> (1 row)
>
> GRE=#
>
> How can I tell plpgsql that an arg like 'f' means varchar (other than
> casting it for every sql function call)?
--
Ken Corey, CTO Atomic Interactive, Ltd.
From | Date | Subject | |
---|---|---|---|
Next Message | benoit.le-dizes@voila.fr | 2001-02-06 13:06:38 | installation |
Previous Message | Ken Corey | 2001-02-06 07:56:57 | Easy way to call a plpgsql function? |